aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmParser
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2012-08-02 08:29:50 +0000
committerJiangning Liu <jiangning.liu@arm.com>2012-08-02 08:29:50 +0000
commitfd652df8b36a9d3e6b09ae2b9f7bcb07e88fdfaa (patch)
tree5d0ce3d875c3c64330d094500418b1470087d2ad /lib/Target/ARM/AsmParser
parentc1b7ca5ba28ded2d83ae534c8e072c2538d43295 (diff)
Fix #13035, a bug around Thumb instruction LDRD/STRD with negative #0 offset index issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 89f7ec227e..c3610c81a6 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -1040,7 +1040,8 @@ public:
// Immediate offset a multiple of 4 in range [-1020, 1020].
if (!Memory.OffsetImm) return true;
int64_t Val = Memory.OffsetImm->getValue();
- return Val >= -1020 && Val <= 1020 && (Val & 3) == 0;
+ // Special case, #-0 is INT32_MIN.
+ return (Val >= -1020 && Val <= 1020 && (Val & 3) == 0) || Val == INT32_MIN;
}
bool isMemImm0_1020s4Offset() const {
if (!isMemory() || Memory.OffsetRegNum != 0 || Memory.Alignment != 0)