diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-10-22 23:16:11 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-10-22 23:16:11 +0000 |
commit | 41f31ef28eb10e6938e491987e3c1d74742ea520 (patch) | |
tree | 825b921a96e4b239391b3fb5ca81cf72960c2b44 /lib/Target/ARM/ARMCodeEmitter.cpp | |
parent | 14e8d71cc945034d4ee6e76be00e00f14efac62f (diff) | |
download | external_llvm-41f31ef28eb10e6938e491987e3c1d74742ea520.zip external_llvm-41f31ef28eb10e6938e491987e3c1d74742ea520.tar.gz external_llvm-41f31ef28eb10e6938e491987e3c1d74742ea520.tar.bz2 |
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
Diffstat (limited to 'lib/Target/ARM/ARMCodeEmitter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMCodeEmitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index 2b1239d..78a73e2 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -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()) |