mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 01:12:59 +00:00
[mips] Add missing MIPS-II disassembler tests.
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723) and were verified by checking the disassembler output is accepted by GAS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
05d48de4fe
commit
5694c5fdb1
13
test/MC/Disassembler/Mips/mips2/invalid-xfail.txt
Normal file
13
test/MC/Disassembler/Mips/mips2/invalid-xfail.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# RUN: llvm-mc %s -triple=mips-unknown-linux -disassemble -mcpu=mips2 | FileCheck %s
|
||||
# XFAIL: *
|
||||
|
||||
# Start with a valid instruction. Otherwise llvm-mc gives up immediately.
|
||||
0x00 0x00 0x00 0x00
|
||||
|
||||
# CHECK: .text
|
||||
0x45 0x06 0x00 0x82 # bc1fl $fcc1, 520 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
||||
0x45 0x07 0xd8 0x01 # bc1tl $fcc1, -40956 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
||||
0x45 0x08 0x14 0x02 # bc1f $fcc2, 20488 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
||||
0x45 0x09 0x01 0x01 # bc1t $fcc2, 1028 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
||||
0x48 0x00 0x00 0x01 # mfc2 $zero, $0, 1 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
||||
0x48 0x86 0x00 0x04 # mtc2 $6, $0, 4 # CHECK: :[[@LINE]]:1: warning: invalid instruction encoding
|
@ -1,9 +1,15 @@
|
||||
# RUN: llvm-mc %s -triple=mips-unknown-linux -disassemble -mcpu=mips2 | FileCheck %s
|
||||
# CHECK: .text
|
||||
0x00 0x00 0x00 0x00 # CHECK: nop
|
||||
0x00 0x00 0x00 0x09 # CHECK: jr $zero
|
||||
0x00 0x00 0x00 0x0d # CHECK: break
|
||||
0x00 0x00 0x00 0x20 # CHECK: add $zero, $zero, $zero
|
||||
0x00 0x00 0x00 0x40 # CHECK: ssnop
|
||||
0x00 0x00 0x00 0x80 # CHECK: sll $zero, $zero, 2
|
||||
0x00 0x00 0x00 0xc0 # CHECK: ehb
|
||||
0x00 0x00 0x28 0x09 # CHECK: jalr $5, $zero
|
||||
0x00 0x00 0x3c 0x80 # CHECK: sll $7, $zero, 18
|
||||
0x00 0x00 0x72 0x0d # CHECK: break 0, 456
|
||||
0x00 0x00 0x88 0x12 # CHECK: mflo $17
|
||||
0x00 0x00 0x98 0x10 # CHECK: mfhi $19
|
||||
0x00 0x00 0xe8 0x10 # CHECK: mfhi $sp
|
||||
@ -14,8 +20,11 @@
|
||||
0x00 0x03 0x10 0x23 # CHECK: negu $2, $3
|
||||
0x00 0x07 0x38 0x27 # CHECK: nor $7, $zero, $7
|
||||
0x00 0x07 0x3c 0x80 # CHECK: sll $7, $7, 18
|
||||
0x00 0x08 0xe8 0x22 # CHECK: neg $sp, $8
|
||||
0x00 0x10 0x00 0x80 # CHECK: sll $zero, $16, 2
|
||||
0x00 0x11 0x8b 0xc3 # CHECK: sra $17, $17, 15
|
||||
0x00 0x17 0x8b 0xc3 # CHECK: sra $17, $23, 15
|
||||
0x00 0x3a 0x3a 0xcc # CHECK: syscall 59627
|
||||
0x00 0x4c 0xb8 0x24 # CHECK: and $23, $2, $12
|
||||
0x00 0x53 0x21 0x72 # CHECK: tlt $2, $19, 133
|
||||
0x00 0x80 0xf0 0x21 # CHECK: move $fp, $4
|
||||
@ -28,6 +37,7 @@
|
||||
0x00 0xb3 0x55 0x30 # CHECK: tge $5, $19, 340
|
||||
0x00 0xc0 0xc8 0x21 # CHECK: move $25, $6
|
||||
0x00 0xc0 0xc8 0x25 # CHECK: move $25, $6
|
||||
0x00 0xc0 0xc8 0x27 # CHECK: not $25, $6
|
||||
0x00 0xd1 0x00 0x36 # CHECK: tne $6, $17
|
||||
0x00 0xe8 0xdd 0x76 # CHECK: tne $7, $8, 885
|
||||
0x00 0xea 0x00 0x30 # CHECK: tge $7, $10
|
||||
@ -40,6 +50,7 @@
|
||||
0x02 0x1d 0x60 0x25 # CHECK: or $12, $16, $sp
|
||||
0x02 0x1d 0xfe 0x33 # CHECK: tltu $16, $sp, 1016
|
||||
0x02 0x20 0x00 0x11 # CHECK: mthi $17
|
||||
0x02 0x27 0x00 0x0d # CHECK: break 551
|
||||
0x02 0x45 0xb8 0x20 # CHECK: add $23, $18, $5
|
||||
0x02 0x6c 0xb0 0x22 # CHECK: sub $22, $19, $12
|
||||
0x02 0x8e 0x5e 0xf1 # CHECK: tgeu $20, $14, 379
|
||||
@ -55,9 +66,11 @@
|
||||
0x03 0xb4 0x00 0x18 # CHECK: mult $sp, $20
|
||||
0x03 0xb7 0x88 0x07 # CHECK: srav $17, $23, $sp
|
||||
0x03 0xb7 0x88 0x07 # CHECK: srav $17, $23, $sp
|
||||
0x03 0xcd 0x23 0xcd # CHECK: break 973, 143
|
||||
0x04 0x11 0x14 0x9b # CHECK: bal 21104
|
||||
0x04 0x83 0xf9 0x4d # CHECK: bgezl $4, -6856
|
||||
0x04 0xd0 0x14 0x9b # CHECK: bltzal $6, 21104
|
||||
0x04 0xd1 0x14 0x9b # CHECK: bgezal $6, 21104
|
||||
0x04 0xd2 0x00 0x7a # CHECK: bltzall $6, 492
|
||||
0x05 0x8e 0x8c 0x31 # CHECK: tnei $12, 35889
|
||||
0x05 0x93 0x07 0x1f # CHECK: bgezall $12, 7296
|
||||
@ -67,6 +80,9 @@
|
||||
0x06 0xac 0xbb 0xa0 # CHECK: teqi $21, 48032
|
||||
0x07 0xa9 0x90 0x33 # CHECK: tgeiu $sp, 36915
|
||||
0x07 0xeb 0xec 0x2c # CHECK: tltiu $ra, 60460
|
||||
0x08 0x00 0x00 0x01 # CHECK: j 4
|
||||
0x09 0x33 0x00 0x2a # CHECK: j 80478376
|
||||
0x0b 0x2a 0xd1 0x44 # CHECK: j 212550928
|
||||
0x21 0x08 0xff 0xfe # CHECK: addi $8, $8, -2
|
||||
0x21 0x2d 0x66 0xd2 # CHECK: addi $13, $9, 26322
|
||||
0x21 0xad 0xe6 0x90 # CHECK: addi $13, $13, -6512
|
||||
@ -80,7 +96,9 @@
|
||||
0x2f 0x38 0xc3 0x55 # CHECK: sltiu $24, $25, -15531
|
||||
0x2f 0x39 0xc3 0x55 # CHECK: sltiu $25, $25, -15531
|
||||
0x30 0x42 0x00 0x04 # CHECK: andi $2, $2, 4
|
||||
0x34 0x42 0x00 0x00 # CHECK: ori $2, $2, 0
|
||||
0x34 0x42 0x00 0x04 # CHECK: ori $2, $2, 4
|
||||
0x3c 0x00 0x00 0x80 # CHECK: lui $zero, 128
|
||||
0x42 0x00 0x00 0x01 # CHECK: tlbr
|
||||
0x42 0x00 0x00 0x02 # CHECK: tlbwi
|
||||
0x42 0x00 0x00 0x06 # CHECK: tlbwr
|
||||
|
13
test/MC/Disassembler/Mips/mips2/valid-xfail.txt
Normal file
13
test/MC/Disassembler/Mips/mips2/valid-xfail.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# RUN: llvm-mc %s -triple=mips-unknown-linux -disassemble -mcpu=mips2 | FileCheck %s
|
||||
# XFAIL: *
|
||||
0x10 0x00 0x00 0x02 # CHECK: b 8
|
||||
0x10 0x00 0x00 0x05 # CHECK: b 20
|
||||
0x10 0x00 0x28 0x09 # CHECK: b 40996
|
||||
0x10 0x04 0x14 0xe1 # CHECK: beq $zero, $4, 21380
|
||||
0x11 0x00 0x00 0xc3 # CHECK: beqz $8, 780
|
||||
0x12 0x88 0x00 0x16 # CHECK: beq $20, $8, 88
|
||||
0x15 0x00 0x88 0x13 # CHECK: bnez $8, -122804
|
||||
0x15 0x8a 0x9f 0x89 # CHECK: bne $12, $10, -98780
|
||||
0x50 0xc7 0x07 0xf2 # CHECK: beql $6, $7, 8136
|
||||
0xc2 0x44 0xe3 0x67 # CHECK: lwc0 $4, -7321($18)
|
||||
0xe2 0x64 0x49 0xd8 # CHECK: swc0 $4, 18904($19)
|
Loading…
Reference in New Issue
Block a user