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:
904b7be
)
Add comment and fix range check in condition.
author
Jim Grosbach
<grosbach@apple.com>
Thu, 19 Jan 2012 01:50:30 +0000
(
01:50
+0000)
committer
Jim Grosbach
<grosbach@apple.com>
Thu, 19 Jan 2012 01:50:30 +0000
(
01:50
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148455
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 adedc208d0e622abbee01285479bce99e27e831d..2a8f7c6dc4e84a2ae62c8d0ed354a28e74b77e9f 100644
(file)
--- a/
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@
-180,8
+180,10
@@
bool ARMAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup,
return Offset > 254 || Offset < -256;
}
case ARM::fixup_arm_thumb_cp: {
+ // If the immediate is negative, greater than 1020, or not a multiple
+ // of four, the wide version of the instruction must be used.
int64_t Offset = int64_t(Value) - 4;
- return Offset >
4095 || Offset < 0
;
+ return Offset >
1020 || Offset < 0 || Offset & 3
;
}
}
llvm_unreachable("Invalid switch/cash!?");