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 // Scalar Signed Integer Convert To Floating-point
7 //----------------------------------------------------------------------
13 // CHECK
: scvtf h23
, h14
// encoding
: [0xd7,0xd9,0x79,0x5e]
14 // CHECK
: scvtf s22
, s13
// encoding
: [0xb6,0xd9,0x21,0x5e]
15 // CHECK
: scvtf d21
, d12
// encoding
: [0x95,0xd9,0x61,0x5e]
17 //----------------------------------------------------------------------
18 // Scalar Unsigned Integer Convert To Floating-point
19 //----------------------------------------------------------------------
25 // CHECK
: ucvtf h20
, h12
// encoding
: [0x94,0xd9,0x79,0x7e]
26 // CHECK
: ucvtf s22
, s13
// encoding
: [0xb6,0xd9,0x21,0x7e]
27 // CHECK
: ucvtf d21
, d14
// encoding
: [0xd5,0xd9,0x61,0x7e]
29 //----------------------------------------------------------------------
30 // Scalar Signed Fixed-point Convert To Floating-Point
(Immediate
)
31 //----------------------------------------------------------------------
37 // CHECK
: scvtf h22
, h13
, #16 // encoding: [0xb6,0xe5,0x10,0x5f]
38 // CHECK
: scvtf s22
, s13
, #32 // encoding: [0xb6,0xe5,0x20,0x5f]
39 // CHECK
: scvtf d21
, d12
, #64 // encoding: [0x95,0xe5,0x40,0x5f]
41 //----------------------------------------------------------------------
42 // Scalar Unsigned Fixed-point Convert To Floating-Point
(Immediate
)
43 //----------------------------------------------------------------------
49 // CHECK
: ucvtf h22
, h13
, #16 // encoding: [0xb6,0xe5,0x10,0x7f]
50 // CHECK
: ucvtf s22
, s13
, #32 // encoding: [0xb6,0xe5,0x20,0x7f]
51 // CHECK
: ucvtf d21
, d14
, #64 // encoding: [0xd5,0xe5,0x40,0x7f]
53 //----------------------------------------------------------------------
54 // Scalar Floating-point Convert To Signed Fixed-point
(Immediate
)
55 //----------------------------------------------------------------------
61 // CHECK
: fcvtzs h21
, h12
, #1 // encoding: [0x95,0xfd,0x1f,0x5f]
62 // CHECK
: fcvtzs s21
, s12
, #1 // encoding: [0x95,0xfd,0x3f,0x5f]
63 // CHECK
: fcvtzs d21
, d12
, #1 // encoding: [0x95,0xfd,0x7f,0x5f]
65 //----------------------------------------------------------------------
66 // Scalar Floating-point Convert To Unsigned Fixed-point
(Immediate
)
67 //----------------------------------------------------------------------
73 // CHECK
: fcvtzu h21
, h12
, #1 // encoding: [0x95,0xfd,0x1f,0x7f]
74 // CHECK
: fcvtzu s21
, s12
, #1 // encoding: [0x95,0xfd,0x3f,0x7f]
75 // CHECK
: fcvtzu d21
, d12
, #1 // encoding: [0x95,0xfd,0x7f,0x7f]
77 //----------------------------------------------------------------------
78 // Scalar Floating-point Convert To Lower Precision Narrow
, Rounding To
80 //----------------------------------------------------------------------
84 // CHECK
: fcvtxn s22
, d13
// encoding
: [0xb6,0x69,0x61,0x7e]
86 //----------------------------------------------------------------------
87 // Scalar Floating-point Convert To Signed Integer
, Rounding To Nearest
89 //----------------------------------------------------------------------
95 // CHECK
: fcvtas h12
, h13
// encoding
: [0xac,0xc9,0x79,0x5e]
96 // CHECK
: fcvtas s12
, s13
// encoding
: [0xac,0xc9,0x21,0x5e]
97 // CHECK
: fcvtas d21
, d14
// encoding
: [0xd5,0xc9,0x61,0x5e]
99 //----------------------------------------------------------------------
100 // Scalar Floating-point Convert To Unsigned Integer
, Rounding To
101 // Nearest With Ties To Away
102 //----------------------------------------------------------------------
108 // CHECK
: fcvtau h12
, h13
// encoding
: [0xac,0xc9,0x79,0x7e]
109 // CHECK
: fcvtau s12
, s13
// encoding
: [0xac,0xc9,0x21,0x7e]
110 // CHECK
: fcvtau d21
, d14
// encoding
: [0xd5,0xc9,0x61,0x7e]
112 //----------------------------------------------------------------------
113 // Scalar Floating-point Convert To Signed Integer
, Rounding Toward
115 //----------------------------------------------------------------------
121 // CHECK
: fcvtms h22
, h13
// encoding
: [0xb6,0xb9,0x79,0x5e]
122 // CHECK
: fcvtms s22
, s13
// encoding
: [0xb6,0xb9,0x21,0x5e]
123 // CHECK
: fcvtms d21
, d14
// encoding
: [0xd5,0xb9,0x61,0x5e]
125 //----------------------------------------------------------------------
126 // Scalar Floating-point Convert To Unsigned Integer
, Rounding Toward
128 //----------------------------------------------------------------------
134 // CHECK
: fcvtmu h12
, h13
// encoding
: [0xac,0xb9,0x79,0x7e]
135 // CHECK
: fcvtmu s12
, s13
// encoding
: [0xac,0xb9,0x21,0x7e]
136 // CHECK
: fcvtmu d21
, d14
// encoding
: [0xd5,0xb9,0x61,0x7e]
138 //----------------------------------------------------------------------
139 // Scalar Floating-point Convert To Signed Integer
, Rounding To Nearest
141 //----------------------------------------------------------------------
147 // CHECK
: fcvtns h22
, h13
// encoding
: [0xb6,0xa9,0x79,0x5e]
148 // CHECK
: fcvtns s22
, s13
// encoding
: [0xb6,0xa9,0x21,0x5e]
149 // CHECK
: fcvtns d21
, d14
// encoding
: [0xd5,0xa9,0x61,0x5e]
151 //----------------------------------------------------------------------
152 // Scalar Floating-point Convert To Unsigned Integer
, Rounding To
153 // Nearest With Ties To Even
154 //----------------------------------------------------------------------
160 // CHECK
: fcvtnu h12
, h13
// encoding
: [0xac,0xa9,0x79,0x7e]
161 // CHECK
: fcvtnu s12
, s13
// encoding
: [0xac,0xa9,0x21,0x7e]
162 // CHECK
: fcvtnu d21
, d14
// encoding
: [0xd5,0xa9,0x61,0x7e]
164 //----------------------------------------------------------------------
165 // Scalar Floating-point Convert To Signed Integer
, Rounding Toward
167 //----------------------------------------------------------------------
173 // CHECK
: fcvtps h22
, h13
// encoding
: [0xb6,0xa9,0xf9,0x5e]
174 // CHECK
: fcvtps s22
, s13
// encoding
: [0xb6,0xa9,0xa1,0x5e]
175 // CHECK
: fcvtps d21
, d14
// encoding
: [0xd5,0xa9,0xe1,0x5e]
177 //----------------------------------------------------------------------
178 // Scalar Floating-point Convert To Unsigned Integer
, Rounding Toward
180 //----------------------------------------------------------------------
186 // CHECK
: fcvtpu h12
, h13
// encoding
: [0xac,0xa9,0xf9,0x7e]
187 // CHECK
: fcvtpu s12
, s13
// encoding
: [0xac,0xa9,0xa1,0x7e]
188 // CHECK
: fcvtpu d21
, d14
// encoding
: [0xd5,0xa9,0xe1,0x7e]
190 //----------------------------------------------------------------------
191 // Scalar Floating-point Convert To Signed Integer
, Rounding Toward Zero
192 //----------------------------------------------------------------------
198 // CHECK
: fcvtzs h12
, h13
// encoding
: [0xac,0xb9,0xf9,0x5e]
199 // CHECK
: fcvtzs s12
, s13
// encoding
: [0xac,0xb9,0xa1,0x5e]
200 // CHECK
: fcvtzs d21
, d14
// encoding
: [0xd5,0xb9,0xe1,0x5e]
202 //----------------------------------------------------------------------
203 // Scalar Floating-point Convert To Unsigned Integer
, Rounding Toward
205 //----------------------------------------------------------------------
211 // CHECK
: fcvtzu h12
, h13
// encoding
: [0xac,0xb9,0xf9,0x7e]
212 // CHECK
: fcvtzu s12
, s13
// encoding
: [0xac,0xb9,0xa1,0x7e]
213 // CHECK
: fcvtzu d21
, d14
// encoding
: [0xd5,0xb9,0xe1,0x7e]