[PATCH] D21077: [ARM] Accept conditional versions of BXNS and BLXNS

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 07:45:50 PDT 2016


olista01 created this revision.
olista01 added reviewers: rengolin, t.p.northover, bsmith.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.

These instructions end in "S" but are not flag-setting, so they need including in the list of special cases in the assembly parser.

Repository:
  rL LLVM

http://reviews.llvm.org/D21077

Files:
  lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  test/MC/ARM/thumbv8m.s

Index: test/MC/ARM/thumbv8m.s
===================================================================
--- test/MC/ARM/thumbv8m.s
+++ test/MC/ARM/thumbv8m.s
@@ -146,12 +146,26 @@
 // CHECK: bxns r0                    @ encoding: [0x04,0x47]
 bxns r0
 
+// UNDEF-BASELINE: error: invalid operand for instruction
+// UNDEF-BASELINE: error: conditional execution not supported in Thumb1
+// CHECK-MAINLINE: it eq                      @ encoding: [0x08,0xbf]
+// CHECK-MAINLINE: bxnseq r1                  @ encoding: [0x0c,0x47]
+it eq
+bxnseq r1
+
 // CHECK: bxns lr                    @ encoding: [0x74,0x47]
 bxns lr
 
 // CHECK: blxns r0                   @ encoding: [0x84,0x47]
 blxns r0
 
+// UNDEF-BASELINE: error: invalid operand for instruction
+// UNDEF-BASELINE: error: conditional execution not supported in Thumb1
+// CHECK-MAINLINE: it eq                      @ encoding: [0x08,0xbf]
+// CHECK-MAINLINE: blxnseq r1                 @ encoding: [0x8c,0x47]
+it eq
+blxnseq r1
+
 // CHECK: tt r0, r1                  @ encoding: [0x41,0xe8,0x00,0xf0]
 tt r0, r1
 
Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -5420,6 +5420,7 @@
         Mnemonic == "fsts" || Mnemonic == "fcpys" || Mnemonic == "fdivs" ||
         Mnemonic == "fmuls" || Mnemonic == "fcmps" || Mnemonic == "fcmpzs" ||
         Mnemonic == "vfms" || Mnemonic == "vfnms" || Mnemonic == "fconsts" ||
+        Mnemonic == "bxns" || Mnemonic == "blxns" ||
         (Mnemonic == "movs" && isThumb()))) {
     Mnemonic = Mnemonic.slice(0, Mnemonic.size() - 1);
     CarrySetting = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21077.59889.patch
Type: text/x-patch
Size: 1717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/7c559178/attachment.bin>


More information about the llvm-commits mailing list