Thumb2 encoding choice correction for PLD.

Using encoding T1 for offset of #0 and encoding T2 for #-0.

rdar://10532413

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2011-12-06 04:49:29 +00:00
parent 286ea03382
commit df33e0d05e
2 changed files with 6 additions and 2 deletions

View File

@@ -916,9 +916,9 @@ public:
if (!isMemory() || Memory.OffsetRegNum != 0 || Memory.Alignment != 0)
return false;
// Immediate offset in range [-255, -1].
if (!Memory.OffsetImm) return true;
if (!Memory.OffsetImm) return false;
int64_t Val = Memory.OffsetImm->getValue();
return Val > -256 && Val < 0;
return (Val == INT32_MIN) || (Val > -256 && Val < 0);
}
bool isMemUImm12Offset() const {
if (!isMemory() || Memory.OffsetRegNum != 0 || Memory.Alignment != 0)