1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -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 //----------------------------------------------------------------------
12 // CHECK: scvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x5e]
13 // CHECK: scvtf d21, d12 // encoding: [0x95,0xd9,0x61,0x5e]
15 //----------------------------------------------------------------------
16 // Scalar Unsigned Integer Convert To Floating-point
17 //----------------------------------------------------------------------
22 // CHECK: ucvtf s22, s13 // encoding: [0xb6,0xd9,0x21,0x7e]
23 // CHECK: ucvtf d21, d14 // encoding: [0xd5,0xd9,0x61,0x7e]
25 //----------------------------------------------------------------------
26 // Scalar Signed Fixed-point Convert To Floating-Point (Immediate)
27 //----------------------------------------------------------------------
32 // CHECK: scvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x5f]
33 // CHECK: scvtf d21, d12, #64 // encoding: [0x95,0xe5,0x40,0x5f]
35 //----------------------------------------------------------------------
36 // Scalar Unsigned Fixed-point Convert To Floating-Point (Immediate)
37 //----------------------------------------------------------------------
42 // CHECK: ucvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x7f]
43 // CHECK: ucvtf d21, d14, #64 // encoding: [0xd5,0xe5,0x40,0x7f]
45 //----------------------------------------------------------------------
46 // Scalar Floating-point Convert To Signed Fixed-point (Immediate)
47 //----------------------------------------------------------------------
52 // CHECK: fcvtzs s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x5f]
53 // CHECK: fcvtzs d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x5f]
55 //----------------------------------------------------------------------
56 // Scalar Floating-point Convert To Unsigned Fixed-point (Immediate)
57 //----------------------------------------------------------------------
62 // CHECK: fcvtzu s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x7f]
63 // CHECK: fcvtzu d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x7f]
65 //----------------------------------------------------------------------
66 // Scalar Floating-point Convert To Lower Precision Narrow, Rounding To
68 //----------------------------------------------------------------------
72 // CHECK: fcvtxn s22, d13 // encoding: [0xb6,0x69,0x61,0x7e]
74 //----------------------------------------------------------------------
75 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest
77 //----------------------------------------------------------------------
82 // CHECK: fcvtas s12, s13 // encoding: [0xac,0xc9,0x21,0x5e]
83 // CHECK: fcvtas d21, d14 // encoding: [0xd5,0xc9,0x61,0x5e]
85 //----------------------------------------------------------------------
86 // Scalar Floating-point Convert To Unsigned Integer, Rounding To
87 // Nearest With Ties To Away
88 //----------------------------------------------------------------------
93 // CHECK: fcvtau s12, s13 // encoding: [0xac,0xc9,0x21,0x7e]
94 // CHECK: fcvtau d21, d14 // encoding: [0xd5,0xc9,0x61,0x7e]
96 //----------------------------------------------------------------------
97 // Scalar Floating-point Convert To Signed Integer, Rounding Toward
99 //----------------------------------------------------------------------
104 // CHECK: fcvtms s22, s13 // encoding: [0xb6,0xb9,0x21,0x5e]
105 // CHECK: fcvtms d21, d14 // encoding: [0xd5,0xb9,0x61,0x5e]
107 //----------------------------------------------------------------------
108 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
110 //----------------------------------------------------------------------
115 // CHECK: fcvtmu s12, s13 // encoding: [0xac,0xb9,0x21,0x7e]
116 // CHECK: fcvtmu d21, d14 // encoding: [0xd5,0xb9,0x61,0x7e]
118 //----------------------------------------------------------------------
119 // Scalar Floating-point Convert To Signed Integer, Rounding To Nearest
121 //----------------------------------------------------------------------
126 // CHECK: fcvtns s22, s13 // encoding: [0xb6,0xa9,0x21,0x5e]
127 // CHECK: fcvtns d21, d14 // encoding: [0xd5,0xa9,0x61,0x5e]
129 //----------------------------------------------------------------------
130 // Scalar Floating-point Convert To Unsigned Integer, Rounding To
131 // Nearest With Ties To Even
132 //----------------------------------------------------------------------
137 // CHECK: fcvtnu s12, s13 // encoding: [0xac,0xa9,0x21,0x7e]
138 // CHECK: fcvtnu d21, d14 // encoding: [0xd5,0xa9,0x61,0x7e]
140 //----------------------------------------------------------------------
141 // Scalar Floating-point Convert To Signed Integer, Rounding Toward
143 //----------------------------------------------------------------------
148 // CHECK: fcvtps s22, s13 // encoding: [0xb6,0xa9,0xa1,0x5e]
149 // CHECK: fcvtps d21, d14 // encoding: [0xd5,0xa9,0xe1,0x5e]
151 //----------------------------------------------------------------------
152 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
154 //----------------------------------------------------------------------
159 // CHECK: fcvtpu s12, s13 // encoding: [0xac,0xa9,0xa1,0x7e]
160 // CHECK: fcvtpu d21, d14 // encoding: [0xd5,0xa9,0xe1,0x7e]
162 //----------------------------------------------------------------------
163 // Scalar Floating-point Convert To Signed Integer, Rounding Toward Zero
164 //----------------------------------------------------------------------
169 // CHECK: fcvtzs s12, s13 // encoding: [0xac,0xb9,0xa1,0x5e]
170 // CHECK: fcvtzs d21, d14 // encoding: [0xd5,0xb9,0xe1,0x5e]
172 //----------------------------------------------------------------------
173 // Scalar Floating-point Convert To Unsigned Integer, Rounding Toward
175 //----------------------------------------------------------------------
180 // CHECK: fcvtzu s12, s13 // encoding: [0xac,0xb9,0xa1,0x7e]
181 // CHECK: fcvtzu d21, d14 // encoding: [0xd5,0xb9,0xe1,0x7e]