xref: /llvm-project/llvm/test/MC/LoongArch/lasx/max.s (revision 99d74edcf5847a108744f652ca2e8f462777fa61)
1*99d74edcSchenli# RUN: llvm-mc --triple=loongarch64 --show-encoding %s | \
2*99d74edcSchenli# RUN:        FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3*99d74edcSchenli# RUN: llvm-mc --triple=loongarch64 --filetype=obj %s | \
4*99d74edcSchenli# RUN:        llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-INST
5*99d74edcSchenli
6*99d74edcSchenlixvmax.b $xr23, $xr8, $xr13
7*99d74edcSchenli# CHECK-INST: xvmax.b $xr23, $xr8, $xr13
8*99d74edcSchenli# CHECK-ENCODING: encoding: [0x17,0x35,0x70,0x74]
9*99d74edcSchenli
10*99d74edcSchenlixvmax.h $xr13, $xr18, $xr28
11*99d74edcSchenli# CHECK-INST: xvmax.h $xr13, $xr18, $xr28
12*99d74edcSchenli# CHECK-ENCODING: encoding: [0x4d,0xf2,0x70,0x74]
13*99d74edcSchenli
14*99d74edcSchenlixvmax.w $xr26, $xr1, $xr2
15*99d74edcSchenli# CHECK-INST: xvmax.w $xr26, $xr1, $xr2
16*99d74edcSchenli# CHECK-ENCODING: encoding: [0x3a,0x08,0x71,0x74]
17*99d74edcSchenli
18*99d74edcSchenlixvmax.d $xr2, $xr17, $xr13
19*99d74edcSchenli# CHECK-INST: xvmax.d $xr2, $xr17, $xr13
20*99d74edcSchenli# CHECK-ENCODING: encoding: [0x22,0xb6,0x71,0x74]
21*99d74edcSchenli
22*99d74edcSchenlixvmaxi.b $xr6, $xr7, 1
23*99d74edcSchenli# CHECK-INST: xvmaxi.b $xr6, $xr7, 1
24*99d74edcSchenli# CHECK-ENCODING: encoding: [0xe6,0x04,0x90,0x76]
25*99d74edcSchenli
26*99d74edcSchenlixvmaxi.h $xr24, $xr10, -7
27*99d74edcSchenli# CHECK-INST: xvmaxi.h $xr24, $xr10, -7
28*99d74edcSchenli# CHECK-ENCODING: encoding: [0x58,0xe5,0x90,0x76]
29*99d74edcSchenli
30*99d74edcSchenlixvmaxi.w $xr24, $xr18, -8
31*99d74edcSchenli# CHECK-INST: xvmaxi.w $xr24, $xr18, -8
32*99d74edcSchenli# CHECK-ENCODING: encoding: [0x58,0x62,0x91,0x76]
33*99d74edcSchenli
34*99d74edcSchenlixvmaxi.d $xr21, $xr5, -11
35*99d74edcSchenli# CHECK-INST: xvmaxi.d $xr21, $xr5, -11
36*99d74edcSchenli# CHECK-ENCODING: encoding: [0xb5,0xd4,0x91,0x76]
37*99d74edcSchenli
38*99d74edcSchenlixvmax.bu $xr29, $xr30, $xr11
39*99d74edcSchenli# CHECK-INST: xvmax.bu $xr29, $xr30, $xr11
40*99d74edcSchenli# CHECK-ENCODING: encoding: [0xdd,0x2f,0x74,0x74]
41*99d74edcSchenli
42*99d74edcSchenlixvmax.hu $xr4, $xr23, $xr27
43*99d74edcSchenli# CHECK-INST: xvmax.hu $xr4, $xr23, $xr27
44*99d74edcSchenli# CHECK-ENCODING: encoding: [0xe4,0xee,0x74,0x74]
45*99d74edcSchenli
46*99d74edcSchenlixvmax.wu $xr31, $xr0, $xr0
47*99d74edcSchenli# CHECK-INST: xvmax.wu $xr31, $xr0, $xr0
48*99d74edcSchenli# CHECK-ENCODING: encoding: [0x1f,0x00,0x75,0x74]
49*99d74edcSchenli
50*99d74edcSchenlixvmax.du $xr5, $xr22, $xr9
51*99d74edcSchenli# CHECK-INST: xvmax.du $xr5, $xr22, $xr9
52*99d74edcSchenli# CHECK-ENCODING: encoding: [0xc5,0xa6,0x75,0x74]
53*99d74edcSchenli
54*99d74edcSchenlixvmaxi.bu $xr12, $xr27, 28
55*99d74edcSchenli# CHECK-INST: xvmaxi.bu $xr12, $xr27, 28
56*99d74edcSchenli# CHECK-ENCODING: encoding: [0x6c,0x73,0x94,0x76]
57*99d74edcSchenli
58*99d74edcSchenlixvmaxi.hu $xr25, $xr4, 16
59*99d74edcSchenli# CHECK-INST: xvmaxi.hu $xr25, $xr4, 16
60*99d74edcSchenli# CHECK-ENCODING: encoding: [0x99,0xc0,0x94,0x76]
61*99d74edcSchenli
62*99d74edcSchenlixvmaxi.wu $xr27, $xr7, 21
63*99d74edcSchenli# CHECK-INST: xvmaxi.wu $xr27, $xr7, 21
64*99d74edcSchenli# CHECK-ENCODING: encoding: [0xfb,0x54,0x95,0x76]
65*99d74edcSchenli
66*99d74edcSchenlixvmaxi.du $xr31, $xr13, 9
67*99d74edcSchenli# CHECK-INST: xvmaxi.du $xr31, $xr13, 9
68*99d74edcSchenli# CHECK-ENCODING: encoding: [0xbf,0xa5,0x95,0x76]
69