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:
6e0784d
)
fix off by 1 error in displacement computation
author
Dale Johannesen
<dalej@apple.com>
Mon, 2 Apr 2007 20:31:06 +0000
(20:31 +0000)
committer
Dale Johannesen
<dalej@apple.com>
Mon, 2 Apr 2007 20:31:06 +0000
(20:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35602
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/ARM/ARMConstantIslandPass.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/ARM/ARMConstantIslandPass.cpp
b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 27e6cc08a3934b028ba537314cc45a46c24f01c3..efe354f63d97e2aef43f9e850e263dd85ea5e74f 100644
(file)
--- a/
lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/
lib/Target/ARM/ARMConstantIslandPass.cpp
@@
-593,6
+593,11
@@
bool ARMConstantIslands::WaterIsInRange(unsigned UserOffset,
Water->begin()->getOpcode() != ARM::CONSTPOOL_ENTRY))
CPEOffset += 2;
Water->begin()->getOpcode() != ARM::CONSTPOOL_ENTRY))
CPEOffset += 2;
+ // If the CPE is to be inserted before the instruction, that will raise
+ // the offset of the instruction.
+ if (CPEOffset < UserOffset)
+ UserOffset += isThumb ? 2 : 4;
+
return OffsetIsInRange (UserOffset, CPEOffset, MaxDisp, !isThumb);
}
return OffsetIsInRange (UserOffset, CPEOffset, MaxDisp, !isThumb);
}