diff options
| author | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-04-08 12:15:05 +0000 |
|---|---|---|
| committer | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-04-08 12:15:05 +0000 |
| commit | 91fc0b3c10b652b435f31bf343432097a08b6acf (patch) | |
| tree | 03a8aaa8ba7705c8861df73500e89b7914e2231c | |
| parent | 7230f80e3bf6523abf826c1d034f5a82b0f12513 (diff) | |
| download | bcm5719-llvm-91fc0b3c10b652b435f31bf343432097a08b6acf.tar.gz bcm5719-llvm-91fc0b3c10b652b435f31bf343432097a08b6acf.zip | |
[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
llvm-svn: 234401
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.td | 4 | ||||
| -rw-r--r-- | llvm/test/MC/Mips/mips-jump-delay-slots.s | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td index b13d372660b..a1fad663b1c 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.td +++ b/llvm/lib/Target/Mips/MipsInstrInfo.td @@ -1594,8 +1594,12 @@ def : MipsInstAlias<"b $offset", (BEQ ZERO, ZERO, brtarget:$offset), 0>; } 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>; diff --git a/llvm/test/MC/Mips/mips-jump-delay-slots.s b/llvm/test/MC/Mips/mips-jump-delay-slots.s index 49f6c159b68..c52416fe156 100644 --- a/llvm/test/MC/Mips/mips-jump-delay-slots.s +++ b/llvm/test/MC/Mips/mips-jump-delay-slots.s @@ -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 |

