mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Hmm, who left this sitting around in my tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc2a2a530f
commit
cf47198a49
@ -125,10 +125,10 @@ namespace {
|
|||||||
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
||||||
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
||||||
// Move the address of the global into the register
|
// Move the address of the global into the register
|
||||||
// X86 does:
|
unsigned TmpReg = makeAnotherReg(V->getType());
|
||||||
// BuildMI(*MBB, IPt, V8::ORrr, 2, Reg).addReg(G0).addGlobalAddress(GV);
|
BuildMI (*MBB, IPt, V8::SETHIi, 1, TmpReg).addGlobalAddress (GV);
|
||||||
// We need to use SETHI and OR.
|
BuildMI (*MBB, IPt, V8::ORri, 2, Reg).addReg (TmpReg)
|
||||||
assert (0 && "Can't move address of global yet");
|
.addGlobalAddress (GV);
|
||||||
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace {
|
|||||||
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
||||||
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
||||||
// Move the address of the global into the register
|
// Move the address of the global into the register
|
||||||
// X86 does:
|
unsigned TmpReg = makeAnotherReg(V->getType());
|
||||||
// BuildMI(*MBB, IPt, V8::ORrr, 2, Reg).addReg(G0).addGlobalAddress(GV);
|
BuildMI (*MBB, IPt, V8::SETHIi, 1, TmpReg).addGlobalAddress (GV);
|
||||||
// We need to use SETHI and OR.
|
BuildMI (*MBB, IPt, V8::ORri, 2, Reg).addReg (TmpReg)
|
||||||
assert (0 && "Can't move address of global yet");
|
.addGlobalAddress (GV);
|
||||||
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace {
|
|||||||
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
||||||
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
||||||
// Move the address of the global into the register
|
// Move the address of the global into the register
|
||||||
// X86 does:
|
unsigned TmpReg = makeAnotherReg(V->getType());
|
||||||
// BuildMI(*MBB, IPt, V8::ORrr, 2, Reg).addReg(G0).addGlobalAddress(GV);
|
BuildMI (*MBB, IPt, V8::SETHIi, 1, TmpReg).addGlobalAddress (GV);
|
||||||
// We need to use SETHI and OR.
|
BuildMI (*MBB, IPt, V8::ORri, 2, Reg).addReg (TmpReg)
|
||||||
assert (0 && "Can't move address of global yet");
|
.addGlobalAddress (GV);
|
||||||
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace {
|
|||||||
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
RegMap.erase(V); // Assign a new name to this constant if ref'd again
|
||||||
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
|
||||||
// Move the address of the global into the register
|
// Move the address of the global into the register
|
||||||
// X86 does:
|
unsigned TmpReg = makeAnotherReg(V->getType());
|
||||||
// BuildMI(*MBB, IPt, V8::ORrr, 2, Reg).addReg(G0).addGlobalAddress(GV);
|
BuildMI (*MBB, IPt, V8::SETHIi, 1, TmpReg).addGlobalAddress (GV);
|
||||||
// We need to use SETHI and OR.
|
BuildMI (*MBB, IPt, V8::ORri, 2, Reg).addReg (TmpReg)
|
||||||
assert (0 && "Can't move address of global yet");
|
.addGlobalAddress (GV);
|
||||||
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
RegMap.erase(V); // Assign a new name to this address if ref'd again
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user