aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 502a48b8bb..bf1f0e8fff 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 {