[llvm-commits] [llvm] r140426 - in /llvm/trunk: lib/Target/ARM/AsmParser/ARMAsmParser.cpp test/MC/ARM/basic-thumb2-instructions.s
Owen Anderson
resistor at mac.com
Fri Sep 23 15:25:02 PDT 2011
Author: resistor
Date: Fri Sep 23 17:25:02 2011
New Revision: 140426
URL: http://llvm.org/viewvc/llvm-project?rev=140426&view=rev
Log:
Teach the Thumb2 AsmParser to accept pre-indexed loads/stores with an offset of #-0.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=140426&r1=140425&r2=140426&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Sep 23 17:25:02 2011
@@ -780,7 +780,7 @@
// Immediate offset in range [-255, 255].
if (!Mem.OffsetImm) return true;
int64_t Val = Mem.OffsetImm->getValue();
- return Val > -256 && Val < 256;
+ return (Val == INT32_MIN) || (Val > -256 && Val < 256);
}
bool isMemPosImm8Offset() const {
if (Kind != Memory || Mem.OffsetRegNum != 0)
Modified: llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s?rev=140426&r1=140425&r2=140426&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s Fri Sep 23 17:25:02 2011
@@ -2236,6 +2236,7 @@
strb lr, [r3], #255
strb r9, [r2], #4
strb r3, [sp], #-4
+ strb r4, [r8, #-0]!
@ CHECK: strb r5, [r5, #-4] @ encoding: [0x05,0xf8,0x04,0x5c]
@ CHECK: strb.w r5, [r6, #32] @ encoding: [0x86,0xf8,0x20,0x50]
@@ -2248,6 +2249,7 @@
@ CHECK: strb lr, [r3], #255 @ encoding: [0x03,0xf8,0xff,0xeb]
@ CHECK: strb r9, [r2], #4 @ encoding: [0x02,0xf8,0x04,0x9b]
@ CHECK: strb r3, [sp], #-4 @ encoding: [0x0d,0xf8,0x04,0x39]
+@ CHECK: strb r4, [r8, #-0]! @ encoding: [0x08,0xf8,0x00,0x4d]
@------------------------------------------------------------------------------
More information about the llvm-commits
mailing list