aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-12-13 19:25:46 +0000
committerJim Grosbach <grosbach@apple.com>2010-12-13 19:25:46 +0000
commit56a2535474dd4482c432b3c75c3dab4b2f3dd1e2 (patch)
treee3281ea551056e1c051b7f818cde870db90aeaa9
parent7e294cfcf97cd7b94bf5c4de0f214480ec13adad (diff)
downloadexternal_llvm-56a2535474dd4482c432b3c75c3dab4b2f3dd1e2.zip
external_llvm-56a2535474dd4482c432b3c75c3dab4b2f3dd1e2.tar.gz
external_llvm-56a2535474dd4482c432b3c75c3dab4b2f3dd1e2.tar.bz2
Use 32-bit types for 32-bit values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121709 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMAsmBackend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAsmBackend.cpp b/lib/Target/ARM/ARMAsmBackend.cpp
index f14a156..ffa9307 100644
--- a/lib/Target/ARM/ARMAsmBackend.cpp
+++ b/lib/Target/ARM/ARMAsmBackend.cpp
@@ -144,14 +144,14 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
Value = Value - 4;
Value >>= 1; // Low bit is not encoded.
- uint64_t out = 0;
+ uint32_t out = 0;
out |= (Value & 0x80000) << 7; // S bit
out |= (Value & 0x40000) >> 7; // J2 bit
out |= (Value & 0x20000) >> 4; // J1 bit
out |= (Value & 0x1F800) << 5; // imm6 field
out |= (Value & 0x007FF); // imm11 field
- uint64_t swapped = (out & 0xFFFF0000) >> 16;
+ uint32_t swapped = (out & 0xFFFF0000) >> 16;
swapped |= (out & 0x0000FFFF) << 16;
return swapped;
}
@@ -226,7 +226,7 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
// Same addressing mode as fixup_arm_pcrel_10,
// but with 16-bit halfwords swapped.
if (Kind == ARM::fixup_t2_pcrel_10) {
- uint64_t swapped = (Value & 0xFFFF0000) >> 16;
+ uint32_t swapped = (Value & 0xFFFF0000) >> 16;
swapped |= (Value & 0x0000FFFF) << 16;
return swapped;
}