mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
1427abbf6b
The tests for the disassembler were adapted from the encoder tests, and for the most part, the output from the disassembler matches that encoder-test inputs. There are some places where more-informative mnemonics could be produced (notably for the branch instructions), and those cases are noted in the tests with FIXMEs. Future work includes: - Generating more-informative mnemonics when possible (this may also be done in the printer). - Remove the dependence on positional "numbered" operand-to-variable mapping (for both encoding and decoding). - Internally using 64-bit instruction variants in 64-bit mode (if this turns out to matter). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197693 91177308-0d34-0410-b5e6-96231b3b80d8
330 lines
6.8 KiB
Plaintext
330 lines
6.8 KiB
Plaintext
# RUN: llvm-mc --disassemble %s -triple powerpc64-unknown-unknown -mcpu=pwr7 | FileCheck %s
|
|
|
|
# CHECK: lfs 2, 128(4)
|
|
0xc0 0x44 0x00 0x80
|
|
|
|
# CHECK: lfsx 2, 3, 4
|
|
0x7c 0x43 0x24 0x2e
|
|
|
|
# CHECK: lfsu 2, 128(4)
|
|
0xc4 0x44 0x00 0x80
|
|
|
|
# CHECK: lfsux 2, 3, 4
|
|
0x7c 0x43 0x24 0x6e
|
|
|
|
# CHECK: lfd 2, 128(4)
|
|
0xc8 0x44 0x00 0x80
|
|
|
|
# CHECK: lfdx 2, 3, 4
|
|
0x7c 0x43 0x24 0xae
|
|
|
|
# CHECK: lfdu 2, 128(4)
|
|
0xcc 0x44 0x00 0x80
|
|
|
|
# CHECK: lfdux 2, 3, 4
|
|
0x7c 0x43 0x24 0xee
|
|
|
|
# CHECK: lfiwax 2, 3, 4
|
|
0x7c 0x43 0x26 0xae
|
|
|
|
# CHECK: lfiwzx 2, 3, 4
|
|
0x7c 0x43 0x26 0xee
|
|
|
|
# CHECK: stfs 2, 128(4)
|
|
0xd0 0x44 0x00 0x80
|
|
|
|
# CHECK: stfsx 2, 3, 4
|
|
0x7c 0x43 0x25 0x2e
|
|
|
|
# CHECK: stfsu 2, 128(4)
|
|
0xd4 0x44 0x00 0x80
|
|
|
|
# CHECK: stfsux 2, 3, 4
|
|
0x7c 0x43 0x25 0x6e
|
|
|
|
# CHECK: stfd 2, 128(4)
|
|
0xd8 0x44 0x00 0x80
|
|
|
|
# CHECK: stfdx 2, 3, 4
|
|
0x7c 0x43 0x25 0xae
|
|
|
|
# CHECK: stfdu 2, 128(4)
|
|
0xdc 0x44 0x00 0x80
|
|
|
|
# CHECK: stfdux 2, 3, 4
|
|
0x7c 0x43 0x25 0xee
|
|
|
|
# CHECK: stfiwx 2, 3, 4
|
|
0x7c 0x43 0x27 0xae
|
|
|
|
# CHECK: fmr 2, 3
|
|
0xfc 0x40 0x18 0x90
|
|
|
|
# CHECK: fmr. 2, 3
|
|
0xfc 0x40 0x18 0x91
|
|
|
|
# CHECK: fneg 2, 3
|
|
0xfc 0x40 0x18 0x50
|
|
|
|
# CHECK: fneg. 2, 3
|
|
0xfc 0x40 0x18 0x51
|
|
|
|
# CHECK: fabs 2, 3
|
|
0xfc 0x40 0x1a 0x10
|
|
|
|
# CHECK: fabs. 2, 3
|
|
0xfc 0x40 0x1a 0x11
|
|
|
|
# CHECK: fnabs 2, 3
|
|
0xfc 0x40 0x19 0x10
|
|
|
|
# CHECK: fnabs. 2, 3
|
|
0xfc 0x40 0x19 0x11
|
|
|
|
# CHECK: fcpsgn 2, 3, 4
|
|
0xfc 0x43 0x20 0x10
|
|
|
|
# CHECK: fcpsgn. 2, 3, 4
|
|
0xfc 0x43 0x20 0x11
|
|
|
|
# CHECK: fadd 2, 3, 4
|
|
0xfc 0x43 0x20 0x2a
|
|
|
|
# CHECK: fadd. 2, 3, 4
|
|
0xfc 0x43 0x20 0x2b
|
|
|
|
# CHECK: fadds 2, 3, 4
|
|
0xec 0x43 0x20 0x2a
|
|
|
|
# CHECK: fadds. 2, 3, 4
|
|
0xec 0x43 0x20 0x2b
|
|
|
|
# CHECK: fsub 2, 3, 4
|
|
0xfc 0x43 0x20 0x28
|
|
|
|
# CHECK: fsub. 2, 3, 4
|
|
0xfc 0x43 0x20 0x29
|
|
|
|
# CHECK: fsubs 2, 3, 4
|
|
0xec 0x43 0x20 0x28
|
|
|
|
# CHECK: fsubs. 2, 3, 4
|
|
0xec 0x43 0x20 0x29
|
|
|
|
# CHECK: fmul 2, 3, 4
|
|
0xfc 0x43 0x01 0x32
|
|
|
|
# CHECK: fmul. 2, 3, 4
|
|
0xfc 0x43 0x01 0x33
|
|
|
|
# CHECK: fmuls 2, 3, 4
|
|
0xec 0x43 0x01 0x32
|
|
|
|
# CHECK: fmuls. 2, 3, 4
|
|
0xec 0x43 0x01 0x33
|
|
|
|
# CHECK: fdiv 2, 3, 4
|
|
0xfc 0x43 0x20 0x24
|
|
|
|
# CHECK: fdiv. 2, 3, 4
|
|
0xfc 0x43 0x20 0x25
|
|
|
|
# CHECK: fdivs 2, 3, 4
|
|
0xec 0x43 0x20 0x24
|
|
|
|
# CHECK: fdivs. 2, 3, 4
|
|
0xec 0x43 0x20 0x25
|
|
|
|
# CHECK: fsqrt 2, 3
|
|
0xfc 0x40 0x18 0x2c
|
|
|
|
# CHECK: fsqrt. 2, 3
|
|
0xfc 0x40 0x18 0x2d
|
|
|
|
# CHECK: fsqrts 2, 3
|
|
0xec 0x40 0x18 0x2c
|
|
|
|
# CHECK: fsqrts. 2, 3
|
|
0xec 0x40 0x18 0x2d
|
|
|
|
# CHECK: fre 2, 3
|
|
0xfc 0x40 0x18 0x30
|
|
|
|
# CHECK: fre. 2, 3
|
|
0xfc 0x40 0x18 0x31
|
|
|
|
# CHECK: fres 2, 3
|
|
0xec 0x40 0x18 0x30
|
|
|
|
# CHECK: fres. 2, 3
|
|
0xec 0x40 0x18 0x31
|
|
|
|
# CHECK: frsqrte 2, 3
|
|
0xfc 0x40 0x18 0x34
|
|
|
|
# CHECK: frsqrte. 2, 3
|
|
0xfc 0x40 0x18 0x35
|
|
|
|
# CHECK: frsqrtes 2, 3
|
|
0xec 0x40 0x18 0x34
|
|
|
|
# CHECK: frsqrtes. 2, 3
|
|
0xec 0x40 0x18 0x35
|
|
|
|
# CHECK: fmadd 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3a
|
|
|
|
# CHECK: fmadd. 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3b
|
|
|
|
# CHECK: fmadds 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3a
|
|
|
|
# CHECK: fmadds. 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3b
|
|
|
|
# CHECK: fmsub 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x38
|
|
|
|
# CHECK: fmsub. 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x39
|
|
|
|
# CHECK: fmsubs 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x38
|
|
|
|
# CHECK: fmsubs. 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x39
|
|
|
|
# CHECK: fnmadd 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3e
|
|
|
|
# CHECK: fnmadd. 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3f
|
|
|
|
# CHECK: fnmadds 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3e
|
|
|
|
# CHECK: fnmadds. 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3f
|
|
|
|
# CHECK: fnmsub 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3c
|
|
|
|
# CHECK: fnmsub. 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x3d
|
|
|
|
# CHECK: fnmsubs 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3c
|
|
|
|
# CHECK: fnmsubs. 2, 3, 4, 5
|
|
0xec 0x43 0x29 0x3d
|
|
|
|
# CHECK: frsp 2, 3
|
|
0xfc 0x40 0x18 0x18
|
|
|
|
# CHECK: frsp. 2, 3
|
|
0xfc 0x40 0x18 0x19
|
|
|
|
# CHECK: fctid 2, 3
|
|
0xfc 0x40 0x1e 0x5c
|
|
|
|
# CHECK: fctid. 2, 3
|
|
0xfc 0x40 0x1e 0x5d
|
|
|
|
# CHECK: fctidz 2, 3
|
|
0xfc 0x40 0x1e 0x5e
|
|
|
|
# CHECK: fctidz. 2, 3
|
|
0xfc 0x40 0x1e 0x5f
|
|
|
|
# CHECK: fctiduz 2, 3
|
|
0xfc 0x40 0x1f 0x5e
|
|
|
|
# CHECK: fctiduz. 2, 3
|
|
0xfc 0x40 0x1f 0x5f
|
|
|
|
# CHECK: fctiw 2, 3
|
|
0xfc 0x40 0x18 0x1c
|
|
|
|
# CHECK: fctiw. 2, 3
|
|
0xfc 0x40 0x18 0x1d
|
|
|
|
# CHECK: fctiwz 2, 3
|
|
0xfc 0x40 0x18 0x1e
|
|
|
|
# CHECK: fctiwz. 2, 3
|
|
0xfc 0x40 0x18 0x1f
|
|
|
|
# CHECK: fctiwuz 2, 3
|
|
0xfc 0x40 0x19 0x1e
|
|
|
|
# CHECK: fctiwuz. 2, 3
|
|
0xfc 0x40 0x19 0x1f
|
|
|
|
# CHECK: fcfid 2, 3
|
|
0xfc 0x40 0x1e 0x9c
|
|
|
|
# CHECK: fcfid. 2, 3
|
|
0xfc 0x40 0x1e 0x9d
|
|
|
|
# CHECK: fcfidu 2, 3
|
|
0xfc 0x40 0x1f 0x9c
|
|
|
|
# CHECK: fcfidu. 2, 3
|
|
0xfc 0x40 0x1f 0x9d
|
|
|
|
# CHECK: fcfids 2, 3
|
|
0xec 0x40 0x1e 0x9c
|
|
|
|
# CHECK: fcfids. 2, 3
|
|
0xec 0x40 0x1e 0x9d
|
|
|
|
# CHECK: fcfidus 2, 3
|
|
0xec 0x40 0x1f 0x9c
|
|
|
|
# CHECK: fcfidus. 2, 3
|
|
0xec 0x40 0x1f 0x9d
|
|
|
|
# CHECK: frin 2, 3
|
|
0xfc 0x40 0x1b 0x10
|
|
|
|
# CHECK: frin. 2, 3
|
|
0xfc 0x40 0x1b 0x11
|
|
|
|
# CHECK: frip 2, 3
|
|
0xfc 0x40 0x1b 0x90
|
|
|
|
# CHECK: frip. 2, 3
|
|
0xfc 0x40 0x1b 0x91
|
|
|
|
# CHECK: friz 2, 3
|
|
0xfc 0x40 0x1b 0x50
|
|
|
|
# CHECK: friz. 2, 3
|
|
0xfc 0x40 0x1b 0x51
|
|
|
|
# CHECK: frim 2, 3
|
|
0xfc 0x40 0x1b 0xd0
|
|
|
|
# CHECK: frim. 2, 3
|
|
0xfc 0x40 0x1b 0xd1
|
|
|
|
# CHECK: fcmpu 2, 3, 4
|
|
0xfd 0x03 0x20 0x00
|
|
|
|
# CHECK: fsel 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x2e
|
|
|
|
# CHECK: fsel. 2, 3, 4, 5
|
|
0xfc 0x43 0x29 0x2f
|
|
|
|
# CHECK: mffs 2
|
|
0xfc 0x40 0x04 0x8e
|
|
|
|
# CHECK: mtfsb0 31
|
|
0xff 0xe0 0x00 0x8c
|
|
|
|
# CHECK: mtfsb1 31
|
|
0xff 0xe0 0x00 0x4c
|
|
|