1// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
2
3// Check that the assembler can handle the documented syntax for AArch64
4
5//----------------------------------------------------------------------
6// Scalar Floating-point Compare Mask Equal
7//----------------------------------------------------------------------
8
9         fcmeq h10, h11, h12
10         fcmeq s10, s11, s12
11         fcmeq d20, d21, d22
12
13// CHECK: fcmeq   h10, h11, h12           // encoding: [0x6a,0x25,0x4c,0x5e]
14// CHECK: fcmeq s10, s11, s12   // encoding: [0x6a,0xe5,0x2c,0x5e]
15// CHECK: fcmeq d20, d21, d22   // encoding: [0xb4,0xe6,0x76,0x5e]
16
17//----------------------------------------------------------------------
18// Scalar Floating-point Compare Mask Equal To Zero
19//----------------------------------------------------------------------
20
21         fcmeq h10, h11, #0.0
22         fcmeq s10, s11, #0.0
23         fcmeq d20, d21, #0.0
24         fcmeq h10, h11, #0
25         fcmeq s10, s11, #0
26         fcmeq d20, d21, #0x0
27
28// CHECK: fcmeq   h10, h11, #0.0          // encoding: [0x6a,0xd9,0xf8,0x5e]
29// CHECK: fcmeq s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x5e]
30// CHECK: fcmeq d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x5e]
31// CHECK: fcmeq   h10, h11, #0.0          // encoding: [0x6a,0xd9,0xf8,0x5e]
32// CHECK: fcmeq s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x5e]
33// CHECK: fcmeq d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x5e]
34
35//----------------------------------------------------------------------
36// Scalar Floating-point Compare Mask Greater Than Or Equal
37//----------------------------------------------------------------------
38
39         fcmge h10, h11, h12
40         fcmge s10, s11, s12
41         fcmge d20, d21, d22
42
43// CHECK: fcmge   h10, h11, h12           // encoding: [0x6a,0x25,0x4c,0x7e]
44// CHECK: fcmge s10, s11, s12   // encoding: [0x6a,0xe5,0x2c,0x7e]
45// CHECK: fcmge d20, d21, d22   // encoding: [0xb4,0xe6,0x76,0x7e]
46
47//----------------------------------------------------------------------
48// Scalar Floating-point Compare Mask Greater Than Or Equal To Zero
49//----------------------------------------------------------------------
50
51         fcmge h10, h11, #0.0
52         fcmge s10, s11, #0.0
53         fcmge d20, d21, #0.0
54         fcmge h10, h11, #0
55         fcmge s10, s11, #0
56         fcmge d20, d21, #0x0
57
58// CHECK: fcmge   h10, h11, #0.0          // encoding: [0x6a,0xc9,0xf8,0x7e]
59// CHECK: fcmge s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x7e]
60// CHECK: fcmge d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x7e]
61// CHECK: fcmge   h10, h11, #0.0          // encoding: [0x6a,0xc9,0xf8,0x7e]
62// CHECK: fcmge s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x7e]
63// CHECK: fcmge d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x7e]
64
65//----------------------------------------------------------------------
66// Scalar Floating-point Compare Mask Greather Than
67//----------------------------------------------------------------------
68
69         fcmgt h10, h11, h12
70         fcmgt s10, s11, s12
71         fcmgt d20, d21, d22
72
73// CHECK: fcmgt   h10, h11, h12           // encoding: [0x6a,0x25,0xcc,0x7e]
74// CHECK: fcmgt s10, s11, s12   // encoding: [0x6a,0xe5,0xac,0x7e]
75// CHECK: fcmgt d20, d21, d22   // encoding: [0xb4,0xe6,0xf6,0x7e]
76
77//----------------------------------------------------------------------
78// Scalar Floating-point Compare Mask Greather Than Zero
79//----------------------------------------------------------------------
80
81         fcmgt h10, h11, #0.0
82         fcmgt s10, s11, #0.0
83         fcmgt d20, d21, #0.0
84         fcmgt h10, h11, #0
85         fcmgt s10, s11, #0
86         fcmgt d20, d21, #0x0
87
88// CHECK: fcmgt   h10, h11, #0.0          // encoding: [0x6a,0xc9,0xf8,0x5e]
89// CHECK: fcmgt s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x5e]
90// CHECK: fcmgt d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x5e]
91// CHECK: fcmgt   h10, h11, #0.0          // encoding: [0x6a,0xc9,0xf8,0x5e]
92// CHECK: fcmgt s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x5e]
93// CHECK: fcmgt d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x5e]
94
95//----------------------------------------------------------------------
96// Scalar Floating-point Compare Mask Less Than Or Equal To Zero
97//----------------------------------------------------------------------
98
99         fcmle h10, h11, #0.0
100         fcmle s10, s11, #0.0
101         fcmle d20, d21, #0.0
102         fcmle h10, h11, #0
103         fcmle s10, s11, #0
104         fcmle d20, d21, #0x0
105
106// CHECK: fcmle   h10, h11, #0.0          // encoding: [0x6a,0xd9,0xf8,0x7e]
107// CHECK: fcmle s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x7e]
108// CHECK: fcmle d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x7e]
109// CHECK: fcmle   h10, h11, #0.0          // encoding: [0x6a,0xd9,0xf8,0x7e]
110// CHECK: fcmle s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x7e]
111// CHECK: fcmle d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x7e]
112
113//----------------------------------------------------------------------
114// Scalar Floating-point Compare Mask Less Than
115//----------------------------------------------------------------------
116
117         fcmlt h10, h11, #0.0
118         fcmlt s10, s11, #0.0
119         fcmlt d20, d21, #0.0
120         fcmlt h10, h11, #0
121         fcmlt s10, s11, #0
122         fcmlt d20, d21, #0x0
123
124// CHECK: fcmlt   h10, h11, #0.0          // encoding: [0x6a,0xe9,0xf8,0x5e]
125// CHECK: fcmlt s10, s11, #0.0   // encoding: [0x6a,0xe9,0xa0,0x5e]
126// CHECK: fcmlt d20, d21, #0.0   // encoding: [0xb4,0xea,0xe0,0x5e]
127// CHECK: fcmlt   h10, h11, #0.0          // encoding: [0x6a,0xe9,0xf8,0x5e]
128// CHECK: fcmlt s10, s11, #0.0   // encoding: [0x6a,0xe9,0xa0,0x5e]
129// CHECK: fcmlt d20, d21, #0.0   // encoding: [0xb4,0xea,0xe0,0x5e]
130
131//----------------------------------------------------------------------
132// Scalar Floating-point Absolute Compare Mask Greater Than Or Equal
133//----------------------------------------------------------------------
134
135         facge h10, h11, h12
136         facge s10, s11, s12
137         facge d20, d21, d22
138
139// CHECK: facge   h10, h11, h12           // encoding: [0x6a,0x2d,0x4c,0x7e]
140// CHECK: facge s10, s11, s12    // encoding: [0x6a,0xed,0x2c,0x7e]
141// CHECK: facge d20, d21, d22    // encoding: [0xb4,0xee,0x76,0x7e]
142
143//----------------------------------------------------------------------
144// Scalar Floating-point Absolute Compare Mask Greater Than
145//----------------------------------------------------------------------
146
147         facgt h10, h11, h12
148         facgt s10, s11, s12
149         facgt d20, d21, d22
150
151// CHECK: facgt   h10, h11, h12           // encoding: [0x6a,0x2d,0xcc,0x7e]
152// CHECK: facgt s10, s11, s12   // encoding: [0x6a,0xed,0xac,0x7e]
153// CHECK: facgt d20, d21, d22   // encoding: [0xb4,0xee,0xf6,0x7e]
154