1// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -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 s10, s11, s12
10         fcmeq d20, d21, d22
11
12// CHECK: fcmeq s10, s11, s12   // encoding: [0x6a,0xe5,0x2c,0x5e]
13// CHECK: fcmeq d20, d21, d22   // encoding: [0xb4,0xe6,0x76,0x5e]
14
15//----------------------------------------------------------------------
16// Scalar Floating-point Compare Mask Equal To Zero
17//----------------------------------------------------------------------
18
19         fcmeq s10, s11, #0.0
20         fcmeq d20, d21, #0.0
21         fcmeq s10, s11, #0
22         fcmeq d20, d21, #0x0
23
24// CHECK: fcmeq s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x5e]
25// CHECK: fcmeq d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x5e]
26// CHECK: fcmeq s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x5e]
27// CHECK: fcmeq d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x5e]
28
29//----------------------------------------------------------------------
30// Scalar Floating-point Compare Mask Greater Than Or Equal
31//----------------------------------------------------------------------
32
33         fcmge s10, s11, s12
34         fcmge d20, d21, d22
35
36// CHECK: fcmge s10, s11, s12   // encoding: [0x6a,0xe5,0x2c,0x7e]
37// CHECK: fcmge d20, d21, d22   // encoding: [0xb4,0xe6,0x76,0x7e]
38
39//----------------------------------------------------------------------
40// Scalar Floating-point Compare Mask Greater Than Or Equal To Zero
41//----------------------------------------------------------------------
42
43         fcmge s10, s11, #0.0
44         fcmge d20, d21, #0.0
45         fcmge s10, s11, #0
46         fcmge d20, d21, #0x0
47
48// CHECK: fcmge s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x7e]
49// CHECK: fcmge d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x7e]
50// CHECK: fcmge s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x7e]
51// CHECK: fcmge d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x7e]
52
53//----------------------------------------------------------------------
54// Scalar Floating-point Compare Mask Greather Than
55//----------------------------------------------------------------------
56
57         fcmgt s10, s11, s12
58         fcmgt d20, d21, d22
59
60// CHECK: fcmgt s10, s11, s12   // encoding: [0x6a,0xe5,0xac,0x7e]
61// CHECK: fcmgt d20, d21, d22   // encoding: [0xb4,0xe6,0xf6,0x7e]
62
63//----------------------------------------------------------------------
64// Scalar Floating-point Compare Mask Greather Than Zero
65//----------------------------------------------------------------------
66
67         fcmgt s10, s11, #0.0
68         fcmgt d20, d21, #0.0
69         fcmgt s10, s11, #0
70         fcmgt d20, d21, #0x0
71
72// CHECK: fcmgt s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x5e]
73// CHECK: fcmgt d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x5e]
74// CHECK: fcmgt s10, s11, #0.0   // encoding: [0x6a,0xc9,0xa0,0x5e]
75// CHECK: fcmgt d20, d21, #0.0   // encoding: [0xb4,0xca,0xe0,0x5e]
76
77//----------------------------------------------------------------------
78// Scalar Floating-point Compare Mask Less Than Or Equal To Zero
79//----------------------------------------------------------------------
80
81         fcmle s10, s11, #0.0
82         fcmle d20, d21, #0.0
83         fcmle s10, s11, #0
84         fcmle d20, d21, #0x0
85
86// CHECK: fcmle s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x7e]
87// CHECK: fcmle d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x7e]
88// CHECK: fcmle s10, s11, #0.0   // encoding: [0x6a,0xd9,0xa0,0x7e]
89// CHECK: fcmle d20, d21, #0.0   // encoding: [0xb4,0xda,0xe0,0x7e]
90
91//----------------------------------------------------------------------
92// Scalar Floating-point Compare Mask Less Than
93//----------------------------------------------------------------------
94
95         fcmlt s10, s11, #0.0
96         fcmlt d20, d21, #0.0
97         fcmlt s10, s11, #0
98         fcmlt d20, d21, #0x0
99
100// CHECK: fcmlt s10, s11, #0.0   // encoding: [0x6a,0xe9,0xa0,0x5e]
101// CHECK: fcmlt d20, d21, #0.0   // encoding: [0xb4,0xea,0xe0,0x5e]
102// CHECK: fcmlt s10, s11, #0.0   // encoding: [0x6a,0xe9,0xa0,0x5e]
103// CHECK: fcmlt d20, d21, #0.0   // encoding: [0xb4,0xea,0xe0,0x5e]
104
105//----------------------------------------------------------------------
106// Scalar Floating-point Absolute Compare Mask Greater Than Or Equal
107//----------------------------------------------------------------------
108
109         facge s10, s11, s12
110         facge d20, d21, d22
111
112// CHECK: facge s10, s11, s12    // encoding: [0x6a,0xed,0x2c,0x7e]
113// CHECK: facge d20, d21, d22    // encoding: [0xb4,0xee,0x76,0x7e]
114
115//----------------------------------------------------------------------
116// Scalar Floating-point Absolute Compare Mask Greater Than
117//----------------------------------------------------------------------
118
119         facgt s10, s11, s12
120         facgt d20, d21, d22
121
122// CHECK: facgt s10, s11, s12   // encoding: [0x6a,0xed,0xac,0x7e]
123// CHECK: facgt d20, d21, d22   // encoding: [0xb4,0xee,0xf6,0x7e]
124