summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-07-26 18:34:25 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-07-26 18:34:25 +0000
commit9b06dd6ca25fd1f8d2cf9227fdffc304c9f51564 (patch)
treeea0c0a8a964e5d0868e065bb16e396a2903a48d1 /test/MC
parentb390abce164eb5ba931ec220be02fc5f35a12b43 (diff)
downloadllvm-9b06dd6ca25fd1f8d2cf9227fdffc304c9f51564.tar.gz
llvm-9b06dd6ca25fd1f8d2cf9227fdffc304c9f51564.tar.bz2
llvm-9b06dd6ca25fd1f8d2cf9227fdffc304c9f51564.tar.xz
[mips] Print instructions "beq", "bne" and "or" using assembler pseudo
instructions "beqz", "bnez" and "move", when possible. beq $2, $zero, $L1 => beqz $2, $L1 bne $2, $zero, $L1 => bnez $2, $L1 or $2, $3, $zero => move $2, $3 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/Disassembler/Mips/mips32_le.txt6
-rw-r--r--test/MC/Mips/mips-alu-instructions.s2
-rw-r--r--test/MC/Mips/mips-jump-instructions.s10
3 files changed, 11 insertions, 7 deletions
diff --git a/test/MC/Disassembler/Mips/mips32_le.txt b/test/MC/Disassembler/Mips/mips32_le.txt
index a0885a4bfe..313f59b117 100644
--- a/test/MC/Disassembler/Mips/mips32_le.txt
+++ b/test/MC/Disassembler/Mips/mips32_le.txt
@@ -260,6 +260,12 @@
# CHECK: mov.s $f6, $f7
0x86 0x39 0x00 0x46
+# CHECK: move $7, $8
+0x21,0x38,0x00,0x01
+
+# CHECK: move $3, $2
+0x25,0x18,0x40,0x00
+
# CHECK: msub $6, $7
0x04 0x00 0xc7 0x70
diff --git a/test/MC/Mips/mips-alu-instructions.s b/test/MC/Mips/mips-alu-instructions.s
index b3dba8654c..eccc2880d4 100644
--- a/test/MC/Mips/mips-alu-instructions.s
+++ b/test/MC/Mips/mips-alu-instructions.s
@@ -13,7 +13,6 @@
# CHECK: ins $19, $9, 6, 7 # encoding: [0x84,0x61,0x33,0x7d]
# CHECK: nor $9, $6, $7 # encoding: [0x27,0x48,0xc7,0x00]
# CHECK: or $3, $3, $5 # encoding: [0x25,0x18,0x65,0x00]
-# CHECK: or $3, $2, $zero # encoding: [0x25,0x18,0x40,0x00]
# CHECK: ori $4, $5, 17767 # encoding: [0x67,0x45,0xa4,0x34]
# CHECK: ori $9, $6, 17767 # encoding: [0x67,0x45,0xc9,0x34]
# CHECK: ori $11, $11, 128 # encoding: [0x80,0x00,0x6b,0x35]
@@ -45,7 +44,6 @@
ins $19, $9, 6,7
nor $9, $6, $7
or $3, $3, $5
- or $3, $2, $zero
or $4, $5, 17767
ori $9, $6, 17767
ori $11, 128
diff --git a/test/MC/Mips/mips-jump-instructions.s b/test/MC/Mips/mips-jump-instructions.s
index bfc052c9ce..989826a1a2 100644
--- a/test/MC/Mips/mips-jump-instructions.s
+++ b/test/MC/Mips/mips-jump-instructions.s
@@ -1,6 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
# RUN: FileCheck -check-prefix=CHECK32 %s
-# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64r2 | \
+# RUN: llvm-mc %s -triple=mips64el-unknown-linux -show-encoding -mcpu=mips64r2 | \
# RUN: FileCheck -check-prefix=CHECK64 %s
# Check that the assembler can handle the documented syntax
@@ -28,9 +28,9 @@
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
# 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: bnez $11, 1332 # encoding: [0x4d,0x01,0x60,0x15]
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK32: beq $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x11]
+# CHECK32: beqz $11, 1332 # encoding: [0x4d,0x01,0x60,0x11]
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK64: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
@@ -53,9 +53,9 @@
# 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: bnez $11, 1332 # encoding: [0x4d,0x01,0x60,0x15]
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK64: beq $11, $zero, 1332 # encoding: [0x4d,0x01,0x60,0x11]
+# CHECK64: beqz $11, 1332 # encoding: [0x4d,0x01,0x60,0x11]
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
.set noreorder