summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJack Carter <jack.carter@imgtec.com>2013-03-28 23:02:21 +0000
committerJack Carter <jack.carter@imgtec.com>2013-03-28 23:02:21 +0000
commite1d85d55e6e2e54f11f0c1ec5cdd3b4c0989093d (patch)
tree76a44a7c96ea44b86fc6173582302d54bbc7e50f /llvm/test
parentff8c45529c4bfc4027aa3a188c86cbbcf162a04d (diff)
downloadbcm5719-llvm-e1d85d55e6e2e54f11f0c1ec5cdd3b4c0989093d.tar.gz
bcm5719-llvm-e1d85d55e6e2e54f11f0c1ec5cdd3b4c0989093d.zip
[Mips Assembler] Add alias definitions for jal
Mips assembler allows following to be used as aliased instructions: jal $rs for jalr $rs jal $rd,$rd for jalr $rd,$rs This patch provides alias definitions in td files and test cases to show the usage. Contributer: Vladimir Medic llvm-svn: 178304
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/Mips/mips-jump-instructions.s16
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/test/MC/Mips/mips-jump-instructions.s b/llvm/test/MC/Mips/mips-jump-instructions.s
index 849eae93250..1dcb287738c 100644
--- a/llvm/test/MC/Mips/mips-jump-instructions.s
+++ b/llvm/test/MC/Mips/mips-jump-instructions.s
@@ -1,4 +1,5 @@
-# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
+# RUN: FileCheck %s
# Check that the assembler can handle the documented syntax
# for jumps and branches.
# CHECK: .section __TEXT,__text,regular,pure_instructions
@@ -25,6 +26,9 @@
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+.set noreorder
+
b 1332
nop
bc1f 1332
@@ -63,6 +67,11 @@ end_of_code:
# CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
j 1328
@@ -78,3 +87,8 @@ end_of_code:
jr $7
nop
j $7
+ nop
+ jal $25
+ nop
+ jal $4,$25
+ nop
OpenPOWER on IntegriCloud