[llvm] r180220 - Mips assembler: Add 64 bit testing for JAL
Jack Carter
jack.carter at imgtec.com
Wed Apr 24 14:52:43 PDT 2013
Author: jacksprat
Date: Wed Apr 24 16:52:42 2013
New Revision: 180220
URL: http://llvm.org/viewvc/llvm-project?rev=180220&view=rev
Log:
Mips assembler: Add 64 bit testing for JAL
Contributer: Vladimir Medic
Modified:
llvm/trunk/test/MC/Mips/mips-jump-instructions.s
Modified: llvm/trunk/test/MC/Mips/mips-jump-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips-jump-instructions.s?rev=180220&r1=180219&r2=180220&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips-jump-instructions.s (original)
+++ llvm/trunk/test/MC/Mips/mips-jump-instructions.s Wed Apr 24 16:52:42 2013
@@ -1,30 +1,54 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
-# RUN: FileCheck %s
+# RUN: FileCheck -check-prefix=CHECK32 %s
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64r2 | \
+# RUN: FileCheck -check-prefix=CHECK64 %s
+
# Check that the assembler can handle the documented syntax
# for jumps and branches.
#------------------------------------------------------------------------------
# Branch instructions
#------------------------------------------------------------------------------
-# CHECK: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
+# 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: nop # encoding: [0x00,0x00,0x00,0x00]
+
+# CHECK64: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
.set noreorder
@@ -53,24 +77,43 @@ end_of_code:
#------------------------------------------------------------------------------
# Jump instructions
#------------------------------------------------------------------------------
-# CHECK: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $6 # encoding: [0x09,0xf8,0xc0,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 $10, $11 # encoding: [0x09,0x50,0x60,0x01]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# 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]
+# CHECK32: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+
+# CHECK64: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
j 1328
More information about the llvm-commits
mailing list