mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
Constants are laid out in memory in PC-relative form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e630b7f3e9
commit
e8e28dd7af
@ -195,7 +195,7 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
|
||||
BBRefs.push_back(std::make_pair(BB, std::make_pair(CurrPC, &MI)));
|
||||
} else if (Constant *C = dyn_cast<Constant>(V)) {
|
||||
if (ConstantMap.find(C) != ConstantMap.end())
|
||||
rv = (int64_t)(intptr_t)ConstantMap[C];
|
||||
rv = (int64_t)(intptr_t)ConstantMap[C] - MCE->getCurrentPCValue();
|
||||
else {
|
||||
std::cerr << "ERROR: constant not in map:" << MO << "\n";
|
||||
abort();
|
||||
|
Loading…
x
Reference in New Issue
Block a user