[llvm-commits] [llvm] r155720 - in /llvm/trunk: lib/Target/ARM/AsmParser/ARMAsmParser.cpp test/MC/ARM/basic-thumb2-instructions.s
Richard Barton
richard.barton at arm.com
Fri Apr 27 10:34:02 PDT 2012
Author: rbarton
Date: Fri Apr 27 12:34:01 2012
New Revision: 155720
URL: http://llvm.org/viewvc/llvm-project?rev=155720&view=rev
Log:
Fix ARM assembly parsing for upper case condition codes on IT instructions.
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=155720&r1=155719&r2=155720&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Apr 27 12:34:01 2012
@@ -2674,7 +2674,7 @@
const AsmToken &Tok = Parser.getTok();
if (!Tok.is(AsmToken::Identifier))
return MatchOperand_NoMatch;
- unsigned CC = StringSwitch<unsigned>(Tok.getString())
+ unsigned CC = StringSwitch<unsigned>(Tok.getString().lower())
.Case("eq", ARMCC::EQ)
.Case("ne", ARMCC::NE)
.Case("hs", ARMCC::HS)
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=155720&r1=155719&r2=155720&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s Fri Apr 27 12:34:01 2012
@@ -509,6 +509,19 @@
@ CHECK: subne r5, r6, r7 @ encoding: [0xf5,0x1b]
@ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d]
+@ Should also work for UPPER CASE condition codes.
+
+ ITEET EQ
+ ADDEQ R0, R1, R2
+ NOPNE
+ SUBNE R5, R6, R7
+ ADDEQ R1, R2, #4
+
+@ CHECK: iteet eq @ encoding: [0x0d,0xbf]
+@ CHECK: addeq r0, r1, r2 @ encoding: [0x88,0x18]
+@ CHECK: nopne @ encoding: [0x00,0xbf]
+@ CHECK: subne r5, r6, r7 @ encoding: [0xf5,0x1b]
+@ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d]
@------------------------------------------------------------------------------
@ LDC{L}/LDC2{L}
More information about the llvm-commits
mailing list