summaryrefslogtreecommitdiffstats
path: root/test/MC/AArch64/neon-tbl.s
blob: bb39fa9f22ae28cb32aab1d4ae6a9962636d07c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// RUN: llvm-mc -triple=arm64 -mattr=+neon -show-encoding < %s | FileCheck %s

// Check that the assembler can handle the documented syntax for AArch64

//------------------------------------------------------------------------------
// Instructions across vector registers
//------------------------------------------------------------------------------

        tbl v0.8b, { v1.16b }, v2.8b
        tbl v0.8b, { v1.16b, v2.16b }, v2.8b
        tbl v0.8b, { v1.16b, v2.16b, v3.16b }, v2.8b
        tbl v0.8b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.8b
        tbl v0.8b, { v31.16b, v0.16b, v1.16b, v2.16b }, v2.8b

// CHECK: tbl	v0.8b, { v1.16b }, v2.8b  // encoding: [0x20,0x00,0x02,0x0e]
// CHECK: tbl	v0.8b, { v1.16b, v2.16b }, v2.8b // encoding: [0x20,0x20,0x02,0x0e]
// CHECK: tbl	v0.8b, { v1.16b, v2.16b, v3.16b }, v2.8b // encoding: [0x20,0x40,0x02,0x0e]
// CHECK: tbl	v0.8b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.8b // encoding: [0x20,0x60,0x02,0x0e]
// CHECK: tbl	v0.8b, { v31.16b, v0.16b, v1.16b, v2.16b }, v2.8b // encoding: [0xe0,0x63,0x02,0x0e]

        tbl v0.16b, { v1.16b }, v2.16b
        tbl v0.16b, { v1.16b, v2.16b }, v2.16b
        tbl v0.16b, { v1.16b, v2.16b, v3.16b }, v2.16b
        tbl v0.16b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.16b
        tbl v0.16b, { v30.16b, v31.16b, v0.16b, v1.16b }, v2.16b

// CHECK: tbl	v0.16b, { v1.16b }, v2.16b // encoding: [0x20,0x00,0x02,0x4e]
// CHECK: tbl	v0.16b, { v1.16b, v2.16b }, v2.16b // encoding: [0x20,0x20,0x02,0x4e]
// CHECK: tbl	v0.16b, { v1.16b, v2.16b, v3.16b }, v2.16b // encoding: [0x20,0x40,0x02,0x4e]
// CHECK: tbl	v0.16b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.16b // encoding: [0x20,0x60,0x02,0x4e]
// CHECK: tbl	v0.16b, { v30.16b, v31.16b, v0.16b, v1.16b }, v2.16b // encoding: [0xc0,0x63,0x02,0x4e]

        tbx v0.8b, { v1.16b }, v2.8b
        tbx v0.8b, { v1.16b, v2.16b }, v2.8b
        tbx v0.8b, { v1.16b, v2.16b, v3.16b }, v2.8b
        tbx v0.8b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.8b
        tbx v0.8b, { v31.16b, v0.16b, v1.16b, v2.16b }, v2.8b

// CHECK: tbx	v0.8b, { v1.16b }, v2.8b  // encoding: [0x20,0x10,0x02,0x0e]
// CHECK: tbx	v0.8b, { v1.16b, v2.16b }, v2.8b // encoding: [0x20,0x30,0x02,0x0e]
// CHECK: tbx	v0.8b, { v1.16b, v2.16b, v3.16b }, v2.8b // encoding: [0x20,0x50,0x02,0x0e]
// CHECK: tbx	v0.8b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.8b // encoding: [0x20,0x70,0x02,0x0e]
// CHECK: tbx	v0.8b, { v31.16b, v0.16b, v1.16b, v2.16b }, v2.8b // encoding: [0xe0,0x73,0x02,0x0e]

        tbx v0.16b, { v1.16b }, v2.16b
        tbx v0.16b, { v1.16b, v2.16b }, v2.16b
        tbx v0.16b, { v1.16b, v2.16b, v3.16b }, v2.16b
        tbx v0.16b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.16b
        tbx v0.16b, { v30.16b, v31.16b, v0.16b, v1.16b }, v2.16b

// CHECK: tbx	v0.16b, { v1.16b }, v2.16b // encoding: [0x20,0x10,0x02,0x4e]
// CHECK: tbx	v0.16b, { v1.16b, v2.16b }, v2.16b // encoding: [0x20,0x30,0x02,0x4e]
// CHECK: tbx	v0.16b, { v1.16b, v2.16b, v3.16b }, v2.16b // encoding: [0x20,0x50,0x02,0x4e]
// CHECK: tbx	v0.16b, { v1.16b, v2.16b, v3.16b, v4.16b }, v2.16b // encoding: [0x20,0x70,0x02,0x4e]
// CHECK: tbx	v0.16b, { v30.16b, v31.16b, v0.16b, v1.16b }, v2.16b // encoding: [0xc0,0x73,0x02,0x4e]