mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
ad017096fc
Differential Revision: http://reviews.llvm.org/D5271 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225627 91177308-0d34-0410-b5e6-96231b3b80d8
477 lines
6.6 KiB
Plaintext
477 lines
6.6 KiB
Plaintext
# RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux -mattr=micromips \
|
|
# RUN: | FileCheck %s
|
|
|
|
# CHECK: add $9, $6, $7
|
|
0x00 0xe6 0x49 0x10
|
|
|
|
# CHECK: addi $9, $6, 17767
|
|
0x11 0x26 0x45 0x67
|
|
|
|
# CHECK: addiu $9, $6, -15001
|
|
0x31 0x26 0xc5 0x67
|
|
|
|
# CHECK: addi $9, $6, 17767
|
|
0x11 0x26 0x45 0x67
|
|
|
|
# CHECK: addiu $9, $6, -15001
|
|
0x31 0x26 0xc5 0x67
|
|
|
|
# CHECK: addiusp -16
|
|
0x4f 0xf9
|
|
|
|
# CHECK: addiusp -1028
|
|
0x4f 0xff
|
|
|
|
# CHECK: addiusp -1032
|
|
0x4f 0xfd
|
|
|
|
# CHECK: addiusp 1024
|
|
0x4c 0x01
|
|
|
|
# CHECK: addiusp 1028
|
|
0x4c 0x03
|
|
|
|
# CHECK: addu $9, $6, $7
|
|
0x00 0xe6 0x49 0x50
|
|
|
|
# CHECK: sub $9, $6, $7
|
|
0x00 0xe6 0x49 0x90
|
|
|
|
# CHECK: subu $4, $3, $5
|
|
0x00 0xa3 0x21 0xd0
|
|
|
|
# CHECK: sub $6, $zero, $7
|
|
0x00 0xe0 0x31 0x90
|
|
|
|
# CHECK: subu $6, $zero, $7
|
|
0x00 0xe0 0x31 0xd0
|
|
|
|
# CHECK: addu $7, $8, $zero
|
|
0x00 0x08 0x39 0x50
|
|
|
|
# CHECK: slt $3, $3, $5
|
|
0x00 0xa3 0x1b 0x50
|
|
|
|
# CHECK: slti $3, $3, 103
|
|
0x90 0x63 0x00 0x67
|
|
|
|
# CHECK: slti $3, $3, 103
|
|
0x90 0x63 0x00 0x67
|
|
|
|
# CHECK: sltiu $3, $3, 103
|
|
0xb0 0x63 0x00 0x67
|
|
|
|
# CHECK: sltu $3, $3, $5
|
|
0x00 0xa3 0x1b 0x90
|
|
|
|
# CHECK: lui $9, 17767
|
|
0x41 0xa9 0x45 0x67
|
|
|
|
# CHECK: and $9, $6, $7
|
|
0x00 0xe6 0x4a 0x50
|
|
|
|
# CHECK: andi $9, $6, 17767
|
|
0xd1 0x26 0x45 0x67
|
|
|
|
# CHECK: andi $9, $6, 17767
|
|
0xd1 0x26 0x45 0x67
|
|
|
|
# CHECK: andi16 $16, $2, 31
|
|
0x2c 0x29
|
|
|
|
# CHECK: or $3, $4, $5
|
|
0x00 0xa4 0x1a 0x90
|
|
|
|
# CHECK: ori $9, $6, 17767
|
|
0x51 0x26 0x45 0x67
|
|
|
|
# CHECK: xor $3, $3, $5
|
|
0x00 0xa3 0x1b 0x10
|
|
|
|
# CHECK: xori $9, $6, 17767
|
|
0x71 0x26 0x45 0x67
|
|
|
|
# CHECK: xori $9, $6, 17767
|
|
0x71 0x26 0x45 0x67
|
|
|
|
# CHECK: nor $9, $6, $7
|
|
0x00 0xe6 0x4a 0xd0
|
|
|
|
# CHECK: not $7, $8
|
|
0x00 0x08 0x3a 0xd0
|
|
|
|
# CHECK: mul $9, $6, $7
|
|
0x00 0xe6 0x4a 0x10
|
|
|
|
# CHECK: mult $9, $7
|
|
0x00 0xe9 0x8b 0x3c
|
|
|
|
# CHECK: multu $9, $7
|
|
0x00 0xe9 0x9b 0x3c
|
|
|
|
# CHECK-EB: div $zero, $9, $7
|
|
0x00 0xe9 0xab 0x3c
|
|
|
|
# CHECK-EB: divu $zero, $9, $7
|
|
0x00 0xe9 0xbb 0x3c
|
|
|
|
# CHECK: sll $4, $3, 7
|
|
0x00 0x83 0x38 0x00
|
|
|
|
# CHECK: sllv $2, $3, $5
|
|
0x00 0x65 0x10 0x10
|
|
|
|
# CHECK: sra $4, $3, 7
|
|
0x00 0x83 0x38 0x80
|
|
|
|
# CHECK: srav $2, $3, $5
|
|
0x00 0x65 0x10 0x90
|
|
|
|
# CHECK: srl $4, $3, 7
|
|
0x00 0x83 0x38 0x40
|
|
|
|
# CHECK: srlv $2, $3, $5
|
|
0x00 0x65 0x10 0x50
|
|
|
|
# CHECK: rotr $9, $6, 7
|
|
0x01 0x26 0x38 0xc0
|
|
|
|
# CHECK: rotrv $9, $6, $7
|
|
0x00 0xc7 0x48 0xd0
|
|
|
|
# CHECK: lb $5, 8($4)
|
|
0x1c 0xa4 0x00 0x08
|
|
|
|
# CHECK: lbu $6, 8($4)
|
|
0x14 0xc4 0x00 0x08
|
|
|
|
# CHECK: lh $2, 8($4)
|
|
0x3c 0x44 0x00 0x08
|
|
|
|
# CHECK: lhu $4, 8($2)
|
|
0x34 0x82 0x00 0x08
|
|
|
|
# CHECK: lw $6, 4($5)
|
|
0xfc 0xc5 0x00 0x04
|
|
|
|
# CHECK: lw $6, 123($sp)
|
|
0xfc 0xdd 0x00 0x7b
|
|
|
|
# CHECK: sb $5, 8($4)
|
|
0x18 0xa4 0x00 0x08
|
|
|
|
# CHECK: sh $2, 8($4)
|
|
0x38 0x44 0x00 0x08
|
|
|
|
# CHECK: sw $5, 4($6)
|
|
0xf8 0xa6 0x00 0x04
|
|
|
|
# CHECK: sw $5, 123($sp)
|
|
0xf8 0xbd 0x00 0x7b
|
|
|
|
# CHECK: lwu $2, 8($4)
|
|
0x60 0x44 0xe0 0x08
|
|
|
|
# CHECK: lwl $4, 16($5)
|
|
0x60 0x85 0x00 0x10
|
|
|
|
# CHECK: lwr $4, 16($5)
|
|
0x60 0x85 0x10 0x10
|
|
|
|
# CHECK: swl $4, 16($5)
|
|
0x60 0x85 0x80 0x10
|
|
|
|
# CHECK: swr $4, 16($5)
|
|
0x60 0x85 0x90 0x10
|
|
|
|
# CHECK: movz $9, $6, $7
|
|
0x00 0xe6 0x48 0x58
|
|
|
|
# CHECK: movn $9, $6, $7
|
|
0x00 0xe6 0x48 0x18
|
|
|
|
# CHECK: movt $9, $6, $fcc0
|
|
0x55 0x26 0x09 0x7b
|
|
|
|
# CHECK: movf $9, $6, $fcc0
|
|
0x55 0x26 0x01 0x7b
|
|
|
|
# CHECK: mthi $6
|
|
0x00 0x06 0x2d 0x7c
|
|
|
|
# CHECK: mfhi $6
|
|
0x00 0x06 0x0d 0x7c
|
|
|
|
# CHECK: mtlo $6
|
|
0x00 0x06 0x3d 0x7c
|
|
|
|
# CHECK: mflo $6
|
|
0x00 0x06 0x1d 0x7c
|
|
|
|
# CHECK: madd $4, $5
|
|
0x00 0xa4 0xcb 0x3c
|
|
|
|
# CHECK: maddu $4, $5
|
|
0x00 0xa4 0xdb 0x3c
|
|
|
|
# CHECK: msub $4, $5
|
|
0x00 0xa4 0xeb 0x3c
|
|
|
|
# CHECK: msubu $4, $5
|
|
0x00 0xa4 0xfb 0x3c
|
|
|
|
# CHECK: clz $9, $6
|
|
0x01 0x26 0x5b 0x3c
|
|
|
|
# CHECK: clo $9, $6
|
|
0x01 0x26 0x4b 0x3c
|
|
|
|
# CHECK: seb $9, $6
|
|
0x01 0x26 0x2b 0x3c
|
|
|
|
# CHECK: seh $9, $6
|
|
0x01 0x26 0x3b 0x3c
|
|
|
|
# CHECK: wsbh $9, $6
|
|
0x01 0x26 0x7b 0x3c
|
|
|
|
# CHECK: ext $9, $6, 3, 7
|
|
0x01 0x26 0x30 0xec
|
|
|
|
# CHECK: ins $9, $6, 3, 7
|
|
0x01 0x26 0x48 0xcc
|
|
|
|
# CHECK: j 1328
|
|
0xd4 0x00 0x02 0x98
|
|
|
|
# CHECK: jal 1328
|
|
0xf4 0x00 0x02 0x98
|
|
|
|
# CHECK: jalr $ra, $6
|
|
0x03 0xe6 0x0f 0x3c
|
|
|
|
# CHECK: jr $7
|
|
0x00 0x07 0x0f 0x3c
|
|
|
|
# CHECK: jraddiusp 20
|
|
0x47 0x05
|
|
|
|
# CHECK: beq $9, $6, 1332
|
|
0x94 0xc9 0x02 0x9a
|
|
|
|
# CHECK: bgez $6, 1332
|
|
0x40 0x46 0x02 0x9a
|
|
|
|
# CHECK: bgezal $6, 1332
|
|
0x40 0x66 0x02 0x9a
|
|
|
|
# CHECK: bltzal $6, 1332
|
|
0x40 0x26 0x02 0x9a
|
|
|
|
# CHECK: bgtz $6, 1332
|
|
0x40 0xc6 0x02 0x9a
|
|
|
|
# CHECK: blez $6, 1332
|
|
0x40 0x86 0x02 0x9a
|
|
|
|
# CHECK: bne $9, $6, 1332
|
|
0xb4 0xc9 0x02 0x9a
|
|
|
|
# CHECK: bltz $6, 1332
|
|
0x40 0x06 0x02 0x9a
|
|
|
|
# CHECK: teq $8, $9, 0
|
|
0x01 0x28 0x00 0x3c
|
|
|
|
# CHECK: tge $8, $9, 0
|
|
0x01 0x28 0x02 0x3c
|
|
|
|
# CHECK: tgeu $8, $9, 0
|
|
0x01 0x28 0x04 0x3c
|
|
|
|
# CHECK: tlt $8, $9, 0
|
|
0x01 0x28 0x08 0x3c
|
|
|
|
# CHECK: tltu $8, $9, 0
|
|
0x01 0x28 0x0a 0x3c
|
|
|
|
# CHECK: tne $8, $9, 0
|
|
0x01 0x28 0x0c 0x3c
|
|
|
|
# CHECK: teqi $9, 17767
|
|
0x41,0xc9,0x45,0x67
|
|
|
|
# CHECK: tgei $9, 17767
|
|
0x41 0x29 0x45 0x67
|
|
|
|
# CHECK: tgeiu $9, 17767
|
|
0x41 0x69 0x45 0x67
|
|
|
|
# CHECK: tlti $9, 17767
|
|
0x41 0x09 0x45 0x67
|
|
|
|
# CHECK: tltiu $9, 17767
|
|
0x41 0x49 0x45 0x67
|
|
|
|
# CHECK: tnei $9, 17767
|
|
0x41 0x89 0x45 0x67
|
|
|
|
# CHECK: cache 1, 8($5)
|
|
0x20 0x25 0x60 0x08
|
|
|
|
# CHECK: pref 1, 8($5)
|
|
0x60 0x25 0x20 0x08
|
|
|
|
# CHECK: ssnop
|
|
0x00 0x00 0x08 0x00
|
|
|
|
# CHECK: ehb
|
|
0x00 0x00 0x18 0x00
|
|
|
|
# CHECK: pause
|
|
0x00 0x00 0x28 0x00
|
|
|
|
# CHECK: ll $2, 8($4)
|
|
0x60 0x44 0x30 0x08
|
|
|
|
# CHECK: sc $2, 8($4)
|
|
0x60 0x44 0xb0 0x08
|
|
|
|
# CHECK: lwxs $2, $3($4)
|
|
0x00 0x64 0x11 0x18
|
|
|
|
# CHECK: bgezals $6, 1332
|
|
0x42 0x66 0x02 0x9a
|
|
|
|
# CHECK: bltzals $6, 1332
|
|
0x42 0x26 0x02 0x9a
|
|
|
|
# CHECK: beqzc $9, 1332
|
|
0x40 0xe9 0x02 0x9a
|
|
|
|
# CHECK: bnezc $9, 1332
|
|
0x40 0xa9 0x02 0x9a
|
|
|
|
# CHECK: jals 1328
|
|
0x74 0x00 0x02 0x98
|
|
|
|
# CHECK: jalrs $ra, $6
|
|
0x03 0xe6 0x4f 0x3c
|
|
|
|
# CHECK: lwm32 $16, $17, 8($4)
|
|
0x20 0x44 0x50 0x08
|
|
|
|
# CHECK: swm32 $16, $17, 8($4)
|
|
0x20 0x44 0xd0 0x08
|
|
|
|
# CHECK: swp $16, 8($4)
|
|
0x22 0x04 0x90 0x08
|
|
|
|
# CHECK: lwp $16, 8($4)
|
|
0x22 0x04 0x10 0x08
|
|
|
|
# CHECK: nop
|
|
0x00 0x00 0x00 0x00
|
|
|
|
# CHECK: addu16 $6, $17, $4
|
|
0x07 0x42
|
|
|
|
# CHECK: subu16 $5, $16, $3
|
|
0x06 0xb1
|
|
|
|
# CHECK: and16 $16, $2
|
|
0x44 0x82
|
|
|
|
# CHECK: not16 $17, $3
|
|
0x44 0x0b
|
|
|
|
# CHECK: or16 $16, $4
|
|
0x44 0xc4
|
|
|
|
# CHECK: xor16 $17, $5
|
|
0x44 0x4d
|
|
|
|
# CHECK: sll16 $3, $16, 5
|
|
0x25 0x8a
|
|
|
|
# CHECK: srl16 $4, $17, 6
|
|
0x26 0x1d
|
|
|
|
# CHECK: lbu16 $3, 4($17)
|
|
0x09 0x94
|
|
|
|
# CHECK: lbu16 $3, -1($16)
|
|
0x09 0x8f
|
|
|
|
# CHECK: lhu16 $3, 4($16)
|
|
0x29 0x82
|
|
|
|
# CHECK: lw16 $4, 8($17)
|
|
0x6a 0x12
|
|
|
|
# CHECK: sb16 $3, 4($16)
|
|
0x89 0x84
|
|
|
|
# CHECK: sh16 $4, 8($17)
|
|
0xaa 0x14
|
|
|
|
# CHECK: sw16 $4, 4($17)
|
|
0xea 0x11
|
|
|
|
# CHECK: sw16 $zero, 4($17)
|
|
0xe8 0x11
|
|
|
|
# CHECK: mfhi $9
|
|
0x46 0x09
|
|
|
|
# CHECK: mflo $9
|
|
0x46 0x49
|
|
|
|
# CHECK: move $25, $1
|
|
0x0f 0x21
|
|
|
|
# CHECK: jrc $9
|
|
0x45 0xa9
|
|
|
|
# CHECK: jalr $9
|
|
0x45 0xc9
|
|
|
|
# CHECK: jalrs16 $9
|
|
0x45 0xe9
|
|
|
|
# CHECK: jr16 $9
|
|
0x45 0x89
|
|
|
|
# CHECK: li16 $3, -1
|
|
0xed 0xff
|
|
|
|
# CHECK: li16 $3, 126
|
|
0xed 0xfe
|
|
|
|
# CHECK: addiur1sp $7, 4
|
|
0x6f 0x83
|
|
|
|
# CHECK: addiur2 $6, $7, -1
|
|
0x6f 0x7e
|
|
|
|
# CHECK: addiur2 $6, $7, 12
|
|
0x6f 0x76
|
|
|
|
# CHECK: addius5 $7, -2
|
|
0x4c 0xfc
|
|
|
|
# CHECK: nop
|
|
0x0c 0x00
|
|
|
|
# CHECK: lw $3, 32($sp)
|
|
0x48 0x68
|
|
|
|
# CHECK: sw $4, 124($sp)
|
|
0xc8 0x9f
|
|
|
|
# CHECK: beqz16 $6, 20
|
|
0x8f 0x0a
|
|
|
|
# CHECK: bnez16 $6, 20
|
|
0xaf 0x0a
|