[llvm] r234401 - [mips] [IAS] Add support for the BNEZL and BEQZL pseudo-instructions.

Toma Tabacu toma.tabacu at imgtec.com
Wed Apr 8 05:15:06 PDT 2015


Author: tomatabacu
Date: Wed Apr  8 07:15:05 2015
New Revision: 234401

URL: http://llvm.org/viewvc/llvm-project?rev=234401&view=rev
Log:
[mips] [IAS] Add support for the BNEZL and BEQZL pseudo-instructions.

Summary:
They are of the form "bnezl/beqzl $rs, offset" and expand to "bnel/beql $rs, $zero, offset".

These instructions are used in Linux inline assembly.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8540

Modified:
    llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
    llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s

Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=234401&r1=234400&r2=234401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Wed Apr  8 07:15:05 2015
@@ -1594,8 +1594,12 @@ def : MipsInstAlias<"b $offset", (BEQ ZE
 }
 def : MipsInstAlias<"bnez $rs,$offset",
                     (BNE GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
+def : MipsInstAlias<"bnezl $rs,$offset",
+                    (BNEL GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
 def : MipsInstAlias<"beqz $rs,$offset",
                     (BEQ GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
+def : MipsInstAlias<"beqzl $rs,$offset",
+                    (BEQL GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
 def : MipsInstAlias<"syscall", (SYSCALL 0), 1>;
     
 def : MipsInstAlias<"break", (BREAK 0, 0), 1>;

Modified: llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s?rev=234401&r1=234400&r2=234401&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s (original)
+++ llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s Wed Apr  8 07:15:05 2015
@@ -68,9 +68,15 @@
         # CHECK: beql $9, $6, 1332
         # CHECK-NOT: nop
         beql $9,$6,1332
+        # CHECK: beql $9, $zero, 1332
+        # CHECK-NOT: nop
+        beqzl $9,1332
         # CHECK: bnel $9, $6, 1332
         # CHECK-NOT: nop
         bnel $9,$6,1332
+        # CHECK: bnel $9, $zero, 1332
+        # CHECK-NOT: nop
+        bnezl $9,1332
         # CHECK: bgezl $6, 1332
         # CHECK-NOT: nop
         bgezl $6,1332





More information about the llvm-commits mailing list