mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
fix off by 1 error in displacement computation
llvm-svn: 35602
This commit is contained in:
parent
726d461daf
commit
e1c3dc7c78
@ -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…
Reference in New Issue
Block a user