1 // RUN
: llvm-mc
-triple aarch64-none-linux-gnu
-mattr
=+neon
,+fullfp16
-show-encoding
< %s | FileCheck
%s
3 // Check that the assembler can handle the documented syntax for AArch64
5 //----------------------------------------------------------------------
6 // Vector Maximum
(Signed
and Unsigned Integer
)
7 //----------------------------------------------------------------------
8 smax v0.8
b, v1.8
b, v2.8
b
9 smax v0.16
b, v1.16
b, v2.16
b
10 smax v0.4h
, v1.4h
, v2.4h
11 smax v0.8h
, v1.8h
, v2.8h
12 smax v0.2s
, v1.2s
, v2.2s
13 smax v0.4s
, v1.4s
, v2.4s
15 // CHECK
: smax v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x64,0x22,0x0e]
16 // CHECK
: smax v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x64,0x22,0x4e]
17 // CHECK
: smax v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x64,0x62,0x0e]
18 // CHECK
: smax v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x64,0x62,0x4e]
19 // CHECK
: smax v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x64,0xa2,0x0e]
20 // CHECK
: smax v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x64,0xa2,0x4e]
22 umax v0.8
b, v1.8
b, v2.8
b
23 umax v0.16
b, v1.16
b, v2.16
b
24 umax v0.4h
, v1.4h
, v2.4h
25 umax v0.8h
, v1.8h
, v2.8h
26 umax v0.2s
, v1.2s
, v2.2s
27 umax v0.4s
, v1.4s
, v2.4s
29 // CHECK
: umax v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x64,0x22,0x2e]
30 // CHECK
: umax v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x64,0x22,0x6e]
31 // CHECK
: umax v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x64,0x62,0x2e]
32 // CHECK
: umax v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x64,0x62,0x6e]
33 // CHECK
: umax v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x64,0xa2,0x2e]
34 // CHECK
: umax v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x64,0xa2,0x6e]
36 //----------------------------------------------------------------------
37 // Vector Minimum
(Signed
and Unsigned Integer
)
38 //----------------------------------------------------------------------
39 smin v0.8
b, v1.8
b, v2.8
b
40 smin v0.16
b, v1.16
b, v2.16
b
41 smin v0.4h
, v1.4h
, v2.4h
42 smin v0.8h
, v1.8h
, v2.8h
43 smin v0.2s
, v1.2s
, v2.2s
44 smin v0.4s
, v1.4s
, v2.4s
46 // CHECK
: smin v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x6c,0x22,0x0e]
47 // CHECK
: smin v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x6c,0x22,0x4e]
48 // CHECK
: smin v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x6c,0x62,0x0e]
49 // CHECK
: smin v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x6c,0x62,0x4e]
50 // CHECK
: smin v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x6c,0xa2,0x0e]
51 // CHECK
: smin v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x6c,0xa2,0x4e]
53 umin v0.8
b, v1.8
b, v2.8
b
54 umin v0.16
b, v1.16
b, v2.16
b
55 umin v0.4h
, v1.4h
, v2.4h
56 umin v0.8h
, v1.8h
, v2.8h
57 umin v0.2s
, v1.2s
, v2.2s
58 umin v0.4s
, v1.4s
, v2.4s
60 // CHECK
: umin v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x6c,0x22,0x2e]
61 // CHECK
: umin v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x6c,0x22,0x6e]
62 // CHECK
: umin v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x6c,0x62,0x2e]
63 // CHECK
: umin v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x6c,0x62,0x6e]
64 // CHECK
: umin v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x6c,0xa2,0x2e]
65 // CHECK
: umin v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x6c,0xa2,0x6e]
67 //----------------------------------------------------------------------
68 // Vector Maximum
(Floating Point
)
69 //----------------------------------------------------------------------
70 fmax v0.4h
, v1.4h
, v2.4h
71 fmax v0.8h
, v1.8h
, v2.8h
72 fmax v0.2s
, v1.2s
, v2.2s
73 fmax v31.4s
, v15.4s
, v16.4s
74 fmax v7.2d
, v8.2d
, v25.2d
76 // CHECK
: fmax v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x34,0x42,0x0e]
77 // CHECK
: fmax v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x34,0x42,0x4e]
78 // CHECK
: fmax v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0xf4,0x22,0x0e]
79 // CHECK
: fmax v31.4s
, v15.4s
, v16.4s
// encoding
: [0xff,0xf5,0x30,0x4e]
80 // CHECK
: fmax v7.2d
, v8.2d
, v25.2d
// encoding
: [0x07,0xf5,0x79,0x4e]
82 //----------------------------------------------------------------------
83 // Vector Minimum
(Floating Point
)
84 //----------------------------------------------------------------------
85 fmin v10.4h
, v15.4h
, v22.4h
86 fmin v10.8h
, v15.8h
, v22.8h
87 fmin v10.2s
, v15.2s
, v22.2s
88 fmin v3.4s
, v5.4s
, v6.4s
89 fmin v17.2d
, v13.2d
, v2.2d
91 // CHECK
: fmin v10.4h
, v15.4h
, v22.4h
// encoding
: [0xea,0x35,0xd6,0x0e]
92 // CHECK
: fmin v10.8h
, v15.8h
, v22.8h
// encoding
: [0xea,0x35,0xd6,0x4e]
93 // CHECK
: fmin v10.2s
, v15.2s
, v22.2s
// encoding
: [0xea,0xf5,0xb6,0x0e]
94 // CHECK
: fmin v3.4s
, v5.4s
, v6.4s
// encoding
: [0xa3,0xf4,0xa6,0x4e]
95 // CHECK
: fmin v17.2d
, v13.2d
, v2.2d
// encoding
: [0xb1,0xf5,0xe2,0x4e]
97 //----------------------------------------------------------------------
98 // Vector maxNum
(Floating Point
)
99 //----------------------------------------------------------------------
100 fmaxnm v0.4h
, v1.4h
, v2.4h
101 fmaxnm v0.8h
, v1.8h
, v2.8h
102 fmaxnm v0.2s
, v1.2s
, v2.2s
103 fmaxnm v31.4s
, v15.4s
, v16.4s
104 fmaxnm v7.2d
, v8.2d
, v25.2d
106 // CHECK
: fmaxnm v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x04,0x42,0x0e]
107 // CHECK
: fmaxnm v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x04,0x42,0x4e]
108 // CHECK
: fmaxnm v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0xc4,0x22,0x0e]
109 // CHECK
: fmaxnm v31.4s
, v15.4s
, v16.4s
// encoding
: [0xff,0xc5,0x30,0x4e]
110 // CHECK
: fmaxnm v7.2d
, v8.2d
, v25.2d
// encoding
: [0x07,0xc5,0x79,0x4e]
112 //----------------------------------------------------------------------
113 // Vector minNum
(Floating Point
)
114 //----------------------------------------------------------------------
115 fminnm v10.4h
, v15.4h
, v22.4h
116 fminnm v10.8h
, v15.8h
, v22.8h
117 fminnm v10.2s
, v15.2s
, v22.2s
118 fminnm v3.4s
, v5.4s
, v6.4s
119 fminnm v17.2d
, v13.2d
, v2.2d
121 // CHECK
: fminnm v10.4h
, v15.4h
, v22.4h
// encoding
: [0xea,0x05,0xd6,0x0e]
122 // CHECK
: fminnm v10.8h
, v15.8h
, v22.8h
// encoding
: [0xea,0x05,0xd6,0x4e]
123 // CHECK
: fminnm v10.2s
, v15.2s
, v22.2s
// encoding
: [0xea,0xc5,0xb6,0x0e]
124 // CHECK
: fminnm v3.4s
, v5.4s
, v6.4s
// encoding
: [0xa3,0xc4,0xa6,0x4e]
125 // CHECK
: fminnm v17.2d
, v13.2d
, v2.2d
// encoding
: [0xb1,0xc5,0xe2,0x4e]