summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJack Carter <jack.carter@imgtec.com>2013-05-16 19:40:19 +0000
committerJack Carter <jack.carter@imgtec.com>2013-05-16 19:40:19 +0000
commit3209baefd4ab8242563118c37d8357bd9de6b421 (patch)
treeaa5b2d77ecb369b9a9f25b2429835dc5d1e3b050 /test
parent8401ed21aa7c8ca022aad4b83fc9c63c0b824720 (diff)
downloadllvm-3209baefd4ab8242563118c37d8357bd9de6b421.tar.gz
llvm-3209baefd4ab8242563118c37d8357bd9de6b421.tar.bz2
llvm-3209baefd4ab8242563118c37d8357bd9de6b421.tar.xz
Mips assembler: Add branch macro definitions
This patch adds bnez and beqz instructions which represent alias definitions for bne and beq instructions as follows: bnez $rs,$imm => bne $rs,$zero,$imm beqz $rs,$imm => beq $rs,$zero,$imm The corresponding test cases are added. Patch by Vladimir Medic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/Mips/mips-jump-instructions.s14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/MC/Mips/mips-jump-instructions.s b/test/MC/Mips/mips-jump-instructions.s
index 597f6872d6..bfc052c9ce 100644
--- a/test/MC/Mips/mips-jump-instructions.s
+++ b/test/MC/Mips/mips-jump-instructions.s
@@ -26,7 +26,11 @@
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK32: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK32: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
+# CHECK32: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bne $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x15]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: beq $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x11]
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK64: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
@@ -49,6 +53,10 @@
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK64: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bne $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x15]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: beq $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x11]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
.set noreorder
@@ -72,6 +80,10 @@
nop
bal 1332
nop
+ bnez $11,1332
+ nop
+ beqz $11,1332
+ nop
end_of_code:
#------------------------------------------------------------------------------