llvm-6502/test/MC/Disassembler/PowerPC/vsx.txt
Hal Finkel ab849adec4 [PowerPC] Initial support for the VSX instruction set
VSX is an ISA extension supported on the POWER7 and later cores that enhances
floating-point vector and scalar capabilities. Among other things, this adds
<2 x double> support and generally helps to reduce register pressure.

The interesting part of this ISA feature is the register configuration: there
are 64 new 128-bit vector registers, the 32 of which are super-registers of the
existing 32 scalar floating-point registers, and the second 32 of which overlap
with the 32 Altivec vector registers. This makes things like vector insertion
and extraction tricky: this can be free but only if we force a restriction to
the right register subclass when needed. A new "minipass" PPCVSXCopy takes care
of this (although it could do a more-optimal job of it; see the comment about
unnecessary copies below).

Please note that, currently, VSX is not enabled by default when targeting
anything because it is not yet ready for that.  The assembler and disassembler
are fully implemented and tested. However:

 - CodeGen support causes miscompiles; test-suite runtime failures:
      MultiSource/Benchmarks/FreeBench/distray/distray
      MultiSource/Benchmarks/McCat/08-main/main
      MultiSource/Benchmarks/Olden/voronoi/voronoi
      MultiSource/Benchmarks/mafft/pairlocalalign
      MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
      SingleSource/Benchmarks/CoyoteBench/almabench
      SingleSource/Benchmarks/Misc/matmul_f64_4x4

 - The lowering currently falls back to using Altivec instructions far more
   than it should. Worse, there are some things that are scalarized through the
   stack that shouldn't be.

 - A lot of unnecessary copies make it past the optimizers, and this needs to
   be fixed.

 - Many more regression tests are needed.

Normally, I'd fix these things prior to committing, but there are some
students and other contributors who would like to work this, and so it makes
sense to move this development process upstream where it can be subject to the
regular code-review procedures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203768 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13 07:58:58 +00:00

453 lines
7.2 KiB
Plaintext

# RUN: llvm-mc --disassemble %s -triple powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s
# CHECK: lxsdx 7, 5, 31
0x7c 0xe5 0xfc 0x98
# CHECK: lxvd2x 7, 5, 31
0x7c 0xe5 0xfe 0x98
# CHECK: lxvdsx 7, 5, 31
0x7c 0xe5 0xfa 0x98
# CHECK: lxvw4x 7, 5, 31
0x7c 0xe5 0xfe 0x18
# CHECK: stxsdx 8, 5, 31
0x7d 0x05 0xfd 0x98
# CHECK: stxvd2x 8, 5, 31
0x7d 0x05 0xff 0x98
# CHECK: stxvw4x 8, 5, 31
0x7d 0x05 0xff 0x18
# CHECK: xsabsdp 7, 27
0xf0 0xe0 0xdd 0x64
# CHECK: xsadddp 7, 63, 27
0xf0 0xff 0xd9 0x04
# CHECK: xscmpodp 6, 63, 27
0xf3 0x1f 0xd9 0x5c
# CHECK: xscmpudp 6, 63, 27
0xf3 0x1f 0xd9 0x1c
# CHECK: xscpsgndp 7, 63, 27
0xf0 0xff 0xdd 0x84
# CHECK: xscvdpsp 7, 27
0xf0 0xe0 0xdc 0x24
# CHECK: xscvdpsxds 7, 27
0xf0 0xe0 0xdd 0x60
# CHECK: xscvdpsxws 7, 27
0xf0 0xe0 0xd9 0x60
# CHECK: xscvdpuxds 7, 27
0xf0 0xe0 0xdd 0x20
# CHECK: xscvdpuxws 7, 27
0xf0 0xe0 0xd9 0x20
# CHECK: xscvspdp 7, 27
0xf0 0xe0 0xdd 0x24
# CHECK: xscvsxddp 7, 27
0xf0 0xe0 0xdd 0xe0
# CHECK: xscvuxddp 7, 27
0xf0 0xe0 0xdd 0xa0
# CHECK: xsdivdp 7, 63, 27
0xf0 0xff 0xd9 0xc4
# CHECK: xsmaddadp 7, 63, 27
0xf0 0xff 0xd9 0x0c
# CHECK: xsmaddmdp 7, 63, 27
0xf0 0xff 0xd9 0x4c
# CHECK: xsmaxdp 7, 63, 27
0xf0 0xff 0xdd 0x04
# CHECK: xsmindp 7, 63, 27
0xf0 0xff 0xdd 0x44
# CHECK: xsmsubadp 7, 63, 27
0xf0 0xff 0xd9 0x8c
# CHECK: xsmsubmdp 7, 63, 27
0xf0 0xff 0xd9 0xcc
# CHECK: xsmuldp 7, 63, 27
0xf0 0xff 0xd9 0x84
# CHECK: xsnabsdp 7, 27
0xf0 0xe0 0xdd 0xa4
# CHECK: xsnegdp 7, 27
0xf0 0xe0 0xdd 0xe4
# CHECK: xsnmaddadp 7, 63, 27
0xf0 0xff 0xdd 0x0c
# CHECK: xsnmaddmdp 7, 63, 27
0xf0 0xff 0xdd 0x4c
# CHECK: xsnmsubadp 7, 63, 27
0xf0 0xff 0xdd 0x8c
# CHECK: xsnmsubmdp 7, 63, 27
0xf0 0xff 0xdd 0xcc
# CHECK: xsrdpi 7, 27
0xf0 0xe0 0xd9 0x24
# CHECK: xsrdpic 7, 27
0xf0 0xe0 0xd9 0xac
# CHECK: xsrdpim 7, 27
0xf0 0xe0 0xd9 0xe4
# CHECK: xsrdpip 7, 27
0xf0 0xe0 0xd9 0xa4
# CHECK: xsrdpiz 7, 27
0xf0 0xe0 0xd9 0x64
# CHECK: xsredp 7, 27
0xf0 0xe0 0xd9 0x68
# CHECK: xsrsqrtedp 7, 27
0xf0 0xe0 0xd9 0x28
# CHECK: xssqrtdp 7, 27
0xf0 0xe0 0xd9 0x2c
# CHECK: xssubdp 7, 63, 27
0xf0 0xff 0xd9 0x44
# CHECK: xstdivdp 6, 63, 27
0xf3 0x1f 0xd9 0xec
# CHECK: xstsqrtdp 6, 27
0xf3 0x00 0xd9 0xa8
# CHECK: xvabsdp 7, 27
0xf0 0xe0 0xdf 0x64
# CHECK: xvabssp 7, 27
0xf0 0xe0 0xde 0x64
# CHECK: xvadddp 7, 63, 27
0xf0 0xff 0xdb 0x04
# CHECK: xvaddsp 7, 63, 27
0xf0 0xff 0xda 0x04
# CHECK: xvcmpeqdp 7, 63, 27
0xf0 0xff 0xdb 0x1c
# CHECK: xvcmpeqdp. 7, 63, 27
0xf0 0xff 0xdf 0x1c
# CHECK: xvcmpeqsp 7, 63, 27
0xf0 0xff 0xda 0x1c
# CHECK: xvcmpeqsp. 7, 63, 27
0xf0 0xff 0xde 0x1c
# CHECK: xvcmpgedp 7, 63, 27
0xf0 0xff 0xdb 0x9c
# CHECK: xvcmpgedp. 7, 63, 27
0xf0 0xff 0xdf 0x9c
# CHECK: xvcmpgesp 7, 63, 27
0xf0 0xff 0xda 0x9c
# CHECK: xvcmpgesp. 7, 63, 27
0xf0 0xff 0xde 0x9c
# CHECK: xvcmpgtdp 7, 63, 27
0xf0 0xff 0xdb 0x5c
# CHECK: xvcmpgtdp. 7, 63, 27
0xf0 0xff 0xdf 0x5c
# CHECK: xvcmpgtsp 7, 63, 27
0xf0 0xff 0xda 0x5c
# CHECK: xvcmpgtsp. 7, 63, 27
0xf0 0xff 0xde 0x5c
# CHECK: xvcpsgndp 7, 63, 27
0xf0 0xff 0xdf 0x84
# CHECK: xvcpsgnsp 7, 63, 27
0xf0 0xff 0xde 0x84
# CHECK: xvcvdpsp 7, 27
0xf0 0xe0 0xde 0x24
# CHECK: xvcvdpsxds 7, 27
0xf0 0xe0 0xdf 0x60
# CHECK: xvcvdpsxws 7, 27
0xf0 0xe0 0xdb 0x60
# CHECK: xvcvdpuxds 7, 27
0xf0 0xe0 0xdf 0x20
# CHECK: xvcvdpuxws 7, 27
0xf0 0xe0 0xdb 0x20
# CHECK: xvcvspdp 7, 27
0xf0 0xe0 0xdf 0x24
# CHECK: xvcvspsxds 7, 27
0xf0 0xe0 0xde 0x60
# CHECK: xvcvspsxws 7, 27
0xf0 0xe0 0xda 0x60
# CHECK: xvcvspuxds 7, 27
0xf0 0xe0 0xde 0x20
# CHECK: xvcvspuxws 7, 27
0xf0 0xe0 0xda 0x20
# CHECK: xvcvsxddp 7, 27
0xf0 0xe0 0xdf 0xe0
# CHECK: xvcvsxdsp 7, 27
0xf0 0xe0 0xde 0xe0
# CHECK: xvcvsxwdp 7, 27
0xf0 0xe0 0xdb 0xe0
# CHECK: xvcvsxwsp 7, 27
0xf0 0xe0 0xda 0xe0
# CHECK: xvcvuxddp 7, 27
0xf0 0xe0 0xdf 0xa0
# CHECK: xvcvuxdsp 7, 27
0xf0 0xe0 0xde 0xa0
# CHECK: xvcvuxwdp 7, 27
0xf0 0xe0 0xdb 0xa0
# CHECK: xvcvuxwsp 7, 27
0xf0 0xe0 0xda 0xa0
# CHECK: xvdivdp 7, 63, 27
0xf0 0xff 0xdb 0xc4
# CHECK: xvdivsp 7, 63, 27
0xf0 0xff 0xda 0xc4
# CHECK: xvmaddadp 7, 63, 27
0xf0 0xff 0xdb 0x0c
# CHECK: xvmaddasp 7, 63, 27
0xf0 0xff 0xda 0x0c
# CHECK: xvmaddmdp 7, 63, 27
0xf0 0xff 0xdb 0x4c
# CHECK: xvmaddmsp 7, 63, 27
0xf0 0xff 0xda 0x4c
# CHECK: xvmaxdp 7, 63, 27
0xf0 0xff 0xdf 0x04
# CHECK: xvmaxsp 7, 63, 27
0xf0 0xff 0xde 0x04
# CHECK: xvmindp 7, 63, 27
0xf0 0xff 0xdf 0x44
# CHECK: xvminsp 7, 63, 27
0xf0 0xff 0xde 0x44
# FIXME: decode as xvmovdp 7, 63
# CHECK: xvcpsgndp 7, 63, 63
0xf0 0xff 0xff 0x86
# FIXME: decode as xvmovsp 7, 63
# CHECK: xvcpsgnsp 7, 63, 63
0xf0 0xff 0xfe 0x86
# CHECK: xvmsubadp 7, 63, 27
0xf0 0xff 0xdb 0x8c
# CHECK: xvmsubasp 7, 63, 27
0xf0 0xff 0xda 0x8c
# CHECK: xvmsubmdp 7, 63, 27
0xf0 0xff 0xdb 0xcc
# CHECK: xvmsubmsp 7, 63, 27
0xf0 0xff 0xda 0xcc
# CHECK: xvmuldp 7, 63, 27
0xf0 0xff 0xdb 0x84
# CHECK: xvmulsp 7, 63, 27
0xf0 0xff 0xda 0x84
# CHECK: xvnabsdp 7, 27
0xf0 0xe0 0xdf 0xa4
# CHECK: xvnabssp 7, 27
0xf0 0xe0 0xde 0xa4
# CHECK: xvnegdp 7, 27
0xf0 0xe0 0xdf 0xe4
# CHECK: xvnegsp 7, 27
0xf0 0xe0 0xde 0xe4
# CHECK: xvnmaddadp 7, 63, 27
0xf0 0xff 0xdf 0x0c
# CHECK: xvnmaddasp 7, 63, 27
0xf0 0xff 0xde 0x0c
# CHECK: xvnmaddmdp 7, 63, 27
0xf0 0xff 0xdf 0x4c
# CHECK: xvnmaddmsp 7, 63, 27
0xf0 0xff 0xde 0x4c
# CHECK: xvnmsubadp 7, 63, 27
0xf0 0xff 0xdf 0x8c
# CHECK: xvnmsubasp 7, 63, 27
0xf0 0xff 0xde 0x8c
# CHECK: xvnmsubmdp 7, 63, 27
0xf0 0xff 0xdf 0xcc
# CHECK: xvnmsubmsp 7, 63, 27
0xf0 0xff 0xde 0xcc
# CHECK: xvrdpi 7, 27
0xf0 0xe0 0xdb 0x24
# CHECK: xvrdpic 7, 27
0xf0 0xe0 0xdb 0xac
# CHECK: xvrdpim 7, 27
0xf0 0xe0 0xdb 0xe4
# CHECK: xvrdpip 7, 27
0xf0 0xe0 0xdb 0xa4
# CHECK: xvrdpiz 7, 27
0xf0 0xe0 0xdb 0x64
# CHECK: xvredp 7, 27
0xf0 0xe0 0xdb 0x68
# CHECK: xvresp 7, 27
0xf0 0xe0 0xda 0x68
# CHECK: xvrspi 7, 27
0xf0 0xe0 0xda 0x24
# CHECK: xvrspic 7, 27
0xf0 0xe0 0xda 0xac
# CHECK: xvrspim 7, 27
0xf0 0xe0 0xda 0xe4
# CHECK: xvrspip 7, 27
0xf0 0xe0 0xda 0xa4
# CHECK: xvrspiz 7, 27
0xf0 0xe0 0xda 0x64
# CHECK: xvrsqrtedp 7, 27
0xf0 0xe0 0xdb 0x28
# CHECK: xvrsqrtesp 7, 27
0xf0 0xe0 0xda 0x28
# CHECK: xvsqrtdp 7, 27
0xf0 0xe0 0xdb 0x2c
# CHECK: xvsqrtsp 7, 27
0xf0 0xe0 0xda 0x2c
# CHECK: xvsubdp 7, 63, 27
0xf0 0xff 0xdb 0x44
# CHECK: xvsubsp 7, 63, 27
0xf0 0xff 0xda 0x44
# CHECK: xvtdivdp 6, 63, 27
0xf3 0x1f 0xdb 0xec
# CHECK: xvtdivsp 6, 63, 27
0xf3 0x1f 0xda 0xec
# CHECK: xvtsqrtdp 6, 27
0xf3 0x00 0xdb 0xa8
# CHECK: xvtsqrtsp 6, 27
0xf3 0x00 0xda 0xa8
# CHECK: xxland 7, 63, 27
0xf0 0xff 0xdc 0x14
# CHECK: xxlandc 7, 63, 27
0xf0 0xff 0xdc 0x54
# CHECK: xxlnor 7, 63, 27
0xf0 0xff 0xdd 0x14
# CHECK: xxlor 7, 63, 27
0xf0 0xff 0xdc 0x94
# CHECK: xxlxor 7, 63, 27
0xf0 0xff 0xdc 0xd4
# FIXME: decode as xxmrghd 7, 63, 27
# CHECK: xxpermdi 7, 63, 27, 0
0xf0 0xff 0xd8 0x54
# CHECK: xxmrghw 7, 63, 27
0xf0 0xff 0xd8 0x94
# FIXME: decode as xxmrgld 7, 63, 27
# CHECK: xxpermdi 7, 63, 27, 3
0xf0 0xff 0xdb 0x54
# CHECK: xxmrglw 7, 63, 27
0xf0 0xff 0xd9 0x94
# CHECK: xxpermdi 7, 63, 27, 2
0xf0 0xff 0xda 0x54
# CHECK: xxsel 7, 63, 27, 14
0xf0 0xff 0xdb 0xb4
# CHECK: xxsldwi 7, 63, 27, 1
0xf0 0xff 0xd9 0x14
# FIXME: decode as xxspltd 7, 63, 1
# CHECK: xxpermdi 7, 63, 63, 3
0xf0 0xff 0xfb 0x56
# CHECK: xxspltw 7, 27, 3
0xf0 0xe3 0xda 0x90
# FIXME: decode as xxswapd 7, 63
# CHECK: xxpermdi 7, 63, 63, 2
0xf0 0xff 0xfa 0x56