mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
fix memory-layout assumption which only holds on little-endian systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
14e8d71cc9
commit
41f31ef28e
@ -505,7 +505,7 @@ void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) {
|
||||
emitGlobalAddress(GV, ARM::reloc_arm_absolute, isa<Function>(GV), false);
|
||||
emitWordLE(0);
|
||||
} else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||
uint32_t Val = *(uint32_t*)CI->getValue().getRawData();
|
||||
uint32_t Val = uint32_t(*CI->getValue().getRawData());
|
||||
emitWordLE(Val);
|
||||
} else if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CV)) {
|
||||
if (CFP->getType()->isFloatTy())
|
||||
|
Loading…
x
Reference in New Issue
Block a user