mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix a nasty bug that was causing miscompilation of global variables
on big endian 32-bit targets in some cases (e.g. PPC). This fixes several PPC JIT failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
667eeca19d
commit
3db4b62c2f
@ -189,7 +189,10 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
uint64_t Offset =
|
||||
TD->getIndexedOffset(CE->getOperand(0)->getType(), Indexes);
|
||||
|
||||
Result.LongVal += Offset;
|
||||
if (getTargetData().getPointerSize() == 4)
|
||||
Result.IntVal += Offset;
|
||||
else
|
||||
Result.LongVal += Offset;
|
||||
return Result;
|
||||
}
|
||||
case Instruction::Cast: {
|
||||
|
Loading…
Reference in New Issue
Block a user