projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6482e91
)
Tidy up value checking.
author
Jim Grosbach
<grosbach@apple.com>
Tue, 6 Dec 2011 01:53:17 +0000
(
01:53
+0000)
committer
Jim Grosbach
<grosbach@apple.com>
Tue, 6 Dec 2011 01:53:17 +0000
(
01:53
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145895
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
b/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 502a48b8bb209c0df5ff6e9dd4798bcecc9f53ae..bf1f0e8fff4cb8021e138fde1f5b01412c295689 100644
(file)
--- 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 {