mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-16 20:40:16 +00:00
fix off by 1 error in displacement computation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35602 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6e0784da77
commit
d959aa421a
@ -593,6 +593,11 @@ bool ARMConstantIslands::WaterIsInRange(unsigned UserOffset,
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user