xref: /aosp_15_r20/external/llvm/test/MC/AArch64/neon-aba-abd.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker// Check that the assembler can handle the documented syntax for AArch64
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
6*9880d681SAndroid Build Coastguard Worker// Vector Absolute Difference and Accumulate (Signed, Unsigned)
7*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
8*9880d681SAndroid Build Coastguard Worker         uaba v0.8b, v1.8b, v2.8b
9*9880d681SAndroid Build Coastguard Worker         uaba v0.16b, v1.16b, v2.16b
10*9880d681SAndroid Build Coastguard Worker         uaba v0.4h, v1.4h, v2.4h
11*9880d681SAndroid Build Coastguard Worker         uaba v0.8h, v1.8h, v2.8h
12*9880d681SAndroid Build Coastguard Worker         uaba v0.2s, v1.2s, v2.2s
13*9880d681SAndroid Build Coastguard Worker         uaba v0.4s, v1.4s, v2.4s
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x7c,0x22,0x2e]
16*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x7c,0x22,0x6e]
17*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x7c,0x62,0x2e]
18*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x7c,0x62,0x6e]
19*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x7c,0xa2,0x2e]
20*9880d681SAndroid Build Coastguard Worker// CHECK: uaba v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x7c,0xa2,0x6e]
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker         saba v0.8b, v1.8b, v2.8b
24*9880d681SAndroid Build Coastguard Worker         saba v0.16b, v1.16b, v2.16b
25*9880d681SAndroid Build Coastguard Worker         saba v0.4h, v1.4h, v2.4h
26*9880d681SAndroid Build Coastguard Worker         saba v0.8h, v1.8h, v2.8h
27*9880d681SAndroid Build Coastguard Worker         saba v0.2s, v1.2s, v2.2s
28*9880d681SAndroid Build Coastguard Worker         saba v0.4s, v1.4s, v2.4s
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.8b, v1.8b, v2.8b         // encoding: [0x20,0x7c,0x22,0x0e]
31*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.16b, v1.16b, v2.16b      // encoding: [0x20,0x7c,0x22,0x4e]
32*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.4h, v1.4h, v2.4h         // encoding: [0x20,0x7c,0x62,0x0e]
33*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.8h, v1.8h, v2.8h         // encoding: [0x20,0x7c,0x62,0x4e]
34*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.2s, v1.2s, v2.2s         // encoding: [0x20,0x7c,0xa2,0x0e]
35*9880d681SAndroid Build Coastguard Worker// CHECK: saba v0.4s, v1.4s, v2.4s         // encoding: [0x20,0x7c,0xa2,0x4e]
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
38*9880d681SAndroid Build Coastguard Worker// Vector Absolute Difference (Signed, Unsigned)
39*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
40*9880d681SAndroid Build Coastguard Worker         uabd v0.8b, v1.8b, v2.8b
41*9880d681SAndroid Build Coastguard Worker         uabd v0.16b, v1.16b, v2.16b
42*9880d681SAndroid Build Coastguard Worker         uabd v0.4h, v1.4h, v2.4h
43*9880d681SAndroid Build Coastguard Worker         uabd v0.8h, v1.8h, v2.8h
44*9880d681SAndroid Build Coastguard Worker         uabd v0.2s, v1.2s, v2.2s
45*9880d681SAndroid Build Coastguard Worker         uabd v0.4s, v1.4s, v2.4s
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x74,0x22,0x2e]
48*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x74,0x22,0x6e]
49*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x74,0x62,0x2e]
50*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x74,0x62,0x6e]
51*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x74,0xa2,0x2e]
52*9880d681SAndroid Build Coastguard Worker// CHECK: uabd v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x74,0xa2,0x6e]
53*9880d681SAndroid Build Coastguard Worker
54*9880d681SAndroid Build Coastguard Worker         sabd v0.8b, v1.8b, v2.8b
55*9880d681SAndroid Build Coastguard Worker         sabd v0.16b, v1.16b, v2.16b
56*9880d681SAndroid Build Coastguard Worker         sabd v0.4h, v1.4h, v2.4h
57*9880d681SAndroid Build Coastguard Worker         sabd v0.8h, v1.8h, v2.8h
58*9880d681SAndroid Build Coastguard Worker         sabd v0.2s, v1.2s, v2.2s
59*9880d681SAndroid Build Coastguard Worker         sabd v0.4s, v1.4s, v2.4s
60*9880d681SAndroid Build Coastguard Worker
61*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.8b, v1.8b, v2.8b        // encoding: [0x20,0x74,0x22,0x0e]
62*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.16b, v1.16b, v2.16b     // encoding: [0x20,0x74,0x22,0x4e]
63*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.4h, v1.4h, v2.4h        // encoding: [0x20,0x74,0x62,0x0e]
64*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.8h, v1.8h, v2.8h        // encoding: [0x20,0x74,0x62,0x4e]
65*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.2s, v1.2s, v2.2s        // encoding: [0x20,0x74,0xa2,0x0e]
66*9880d681SAndroid Build Coastguard Worker// CHECK: sabd v0.4s, v1.4s, v2.4s        // encoding: [0x20,0x74,0xa2,0x4e]
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
69*9880d681SAndroid Build Coastguard Worker// Vector Absolute Difference (Floating Point)
70*9880d681SAndroid Build Coastguard Worker//----------------------------------------------------------------------
71*9880d681SAndroid Build Coastguard Worker         fabd v0.4h, v1.4h, v2.4h
72*9880d681SAndroid Build Coastguard Worker         fabd v0.2s, v1.2s, v2.2s
73*9880d681SAndroid Build Coastguard Worker         fabd v31.4s, v15.4s, v16.4s
74*9880d681SAndroid Build Coastguard Worker         fabd v7.2d, v8.2d, v25.2d
75*9880d681SAndroid Build Coastguard Worker
76*9880d681SAndroid Build Coastguard Worker// CHECK: fabd    v0.4h, v1.4h, v2.4h     // encoding: [0x20,0x14,0xc2,0x2e]
77*9880d681SAndroid Build Coastguard Worker// CHECK: fabd v0.2s, v1.2s, v2.2s    // encoding: [0x20,0xd4,0xa2,0x2e]
78*9880d681SAndroid Build Coastguard Worker// CHECK: fabd v31.4s, v15.4s, v16.4s // encoding: [0xff,0xd5,0xb0,0x6e]
79*9880d681SAndroid Build Coastguard Worker// CHECK: fabd v7.2d, v8.2d, v25.2d   // encoding: [0x07,0xd5,0xf9,0x6e]
80*9880d681SAndroid Build Coastguard Worker
81