aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorAsiri Rathnayake <asiri.rathnayake@arm.com>2015-02-12 13:37:28 +0000
committerAsiri Rathnayake <asiri.rathnayake@arm.com>2015-02-12 13:37:28 +0000
commite045e378ade9a6aaad3531f647e39a76bab53184 (patch)
tree17cc17ab485d00276742ed8e35db9db6588babcf /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent421f669215f87567301d101221b8d900a7d2e38a (diff)
downloadllvm-e045e378ade9a6aaad3531f647e39a76bab53184.zip
llvm-e045e378ade9a6aaad3531f647e39a76bab53184.tar.gz
llvm-e045e378ade9a6aaad3531f647e39a76bab53184.tar.bz2
ARM: Fix another regression introduced in r223113
The changes in r223113 (ARM modified-immediate syntax) have broken instructions like: mov r0, #~0xffffff00 The problem is that I've added a spurious range check on the immediate operand to ensure that it lies between INT32_MIN and UINT32_MAX. While this range check is correct in theory, it causes problems because the operand is stored in an int64_t (by MC). So valid 32-bit constants like \#~0xffffff00 become out of range. The solution is to simply remove this range check. It is not possible to validate the range of the immediate operand with the current setup because: 1) The operand is stored in an int64_t by MC, 2) The immediate can be of the forms #imm, #-imm, #~imm or even #((~imm)) etc. So we just chop the value to 32 bits and use it. Also noted that the original range check was note tested by any of the unit tests. I've added a new test to cover #~imm kind of operands. Change-Id: I411e90d84312a2eff01b732bb238af536c4a7599 llvm-svn: 228920
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions