diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-12-06 01:53:17 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-12-06 01:53:17 +0000 |
commit | cb86509e7a0f831e28c89f84c22a409115d01c38 (patch) | |
tree | 1027ea939b24d3485e36074de0ca3eec27cb5d95 /lib/Target/ARM/MCTargetDesc | |
parent | 6482e9114954def43fc08e83aadec1aadfc64200 (diff) | |
download | external_llvm-cb86509e7a0f831e28c89f84c22a409115d01c38.zip external_llvm-cb86509e7a0f831e28c89f84c22a409115d01c38.tar.gz external_llvm-cb86509e7a0f831e28c89f84c22a409115d01c38.tar.bz2 |
Tidy up value checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/MCTargetDesc')
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 502a48b..bf1f0e8 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -152,7 +152,8 @@ bool ARMAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup, // encodable. // // Relax if the value is too big for a (signed) i8. - return int64_t((Value - 4)>>1) != int64_t(int8_t((Value - 4)>>1)); + int64_t Offset = int64_t(Value) - 4; + return Offset > 254 || Offset < -256; } void ARMAsmBackend::RelaxInstruction(const MCInst &Inst, MCInst &Res) const { |