[llvm-commits] [llvm] r145895 - /llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Jim Grosbach
grosbach at apple.com
Mon Dec 5 17:53:17 PST 2011
Author: grosbach
Date: Mon Dec 5 19:53:17 2011
New Revision: 145895
URL: http://llvm.org/viewvc/llvm-project?rev=145895&view=rev
Log:
Tidy up value checking.
Modified:
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=145895&r1=145894&r2=145895&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Mon Dec 5 19:53:17 2011
@@ -152,7 +152,8 @@
// 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 {
More information about the llvm-commits
mailing list