1 // RUN: llvm-mc -triple arm64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s
3 // Check that the assembler can handle the documented syntax for AArch64
6 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 add v0.8b, v1.8b, v2.8b
10 add v0.16b, v1.16b, v2.16b
11 add v0.4h, v1.4h, v2.4h
12 add v0.8h, v1.8h, v2.8h
13 add v0.2s, v1.2s, v2.2s
14 add v0.4s, v1.4s, v2.4s
15 add v0.2d, v1.2d, v2.2d
17 // CHECK: add v0.8b, v1.8b, v2.8b // encoding: [0x20,0x84,0x22,0x0e]
18 // CHECK: add v0.16b, v1.16b, v2.16b // encoding: [0x20,0x84,0x22,0x4e]
19 // CHECK: add v0.4h, v1.4h, v2.4h // encoding: [0x20,0x84,0x62,0x0e]
20 // CHECK: add v0.8h, v1.8h, v2.8h // encoding: [0x20,0x84,0x62,0x4e]
21 // CHECK: add v0.2s, v1.2s, v2.2s // encoding: [0x20,0x84,0xa2,0x0e]
22 // CHECK: add v0.4s, v1.4s, v2.4s // encoding: [0x20,0x84,0xa2,0x4e]
23 // CHECK: add v0.2d, v1.2d, v2.2d // encoding: [0x20,0x84,0xe2,0x4e]
25 //------------------------------------------------------------------------------
27 //------------------------------------------------------------------------------
28 sub v0.8b, v1.8b, v2.8b
29 sub v0.16b, v1.16b, v2.16b
30 sub v0.4h, v1.4h, v2.4h
31 sub v0.8h, v1.8h, v2.8h
32 sub v0.2s, v1.2s, v2.2s
33 sub v0.4s, v1.4s, v2.4s
34 sub v0.2d, v1.2d, v2.2d
36 // CHECK: sub v0.8b, v1.8b, v2.8b // encoding: [0x20,0x84,0x22,0x2e]
37 // CHECK: sub v0.16b, v1.16b, v2.16b // encoding: [0x20,0x84,0x22,0x6e]
38 // CHECK: sub v0.4h, v1.4h, v2.4h // encoding: [0x20,0x84,0x62,0x2e]
39 // CHECK: sub v0.8h, v1.8h, v2.8h // encoding: [0x20,0x84,0x62,0x6e]
40 // CHECK: sub v0.2s, v1.2s, v2.2s // encoding: [0x20,0x84,0xa2,0x2e]
41 // CHECK: sub v0.4s, v1.4s, v2.4s // encoding: [0x20,0x84,0xa2,0x6e]
42 // CHECK: sub v0.2d, v1.2d, v2.2d // encoding: [0x20,0x84,0xe2,0x6e]
44 //------------------------------------------------------------------------------
45 // Vector Floating-Point Add
46 //------------------------------------------------------------------------------
47 fadd v0.2s, v1.2s, v2.2s
48 fadd v0.4s, v1.4s, v2.4s
49 fadd v0.2d, v1.2d, v2.2d
51 // CHECK: fadd v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0x22,0x0e]
52 // CHECK: fadd v0.4s, v1.4s, v2.4s // encoding: [0x20,0xd4,0x22,0x4e]
53 // CHECK: fadd v0.2d, v1.2d, v2.2d // encoding: [0x20,0xd4,0x62,0x4e]
56 //------------------------------------------------------------------------------
57 // Vector Floating-Point Sub
58 //------------------------------------------------------------------------------
59 fsub v0.2s, v1.2s, v2.2s
60 fsub v0.4s, v1.4s, v2.4s
61 fsub v0.2d, v1.2d, v2.2d
63 // CHECK: fsub v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0xa2,0x0e]
64 // CHECK: fsub v0.4s, v1.4s, v2.4s // encoding: [0x20,0xd4,0xa2,0x4e]
65 // CHECK: fsub v0.2d, v1.2d, v2.2d // encoding: [0x20,0xd4,0xe2,0x4e]