• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6// RUN:        | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9
10incp    x0, p0.b
11// CHECK-INST: incp    x0, p0.b
12// CHECK-ENCODING: [0x00,0x88,0x2c,0x25]
13// CHECK-ERROR: instruction requires: sve
14// CHECK-UNKNOWN: 00 88 2c 25 <unknown>
15
16incp    x0, p0.h
17// CHECK-INST: incp    x0, p0.h
18// CHECK-ENCODING: [0x00,0x88,0x6c,0x25]
19// CHECK-ERROR: instruction requires: sve
20// CHECK-UNKNOWN: 00 88 6c 25 <unknown>
21
22incp    x0, p0.s
23// CHECK-INST: incp    x0, p0.s
24// CHECK-ENCODING: [0x00,0x88,0xac,0x25]
25// CHECK-ERROR: instruction requires: sve
26// CHECK-UNKNOWN: 00 88 ac 25 <unknown>
27
28incp    x0, p0.d
29// CHECK-INST: incp    x0, p0.d
30// CHECK-ENCODING: [0x00,0x88,0xec,0x25]
31// CHECK-ERROR: instruction requires: sve
32// CHECK-UNKNOWN: 00 88 ec 25 <unknown>
33
34incp    xzr, p15.b
35// CHECK-INST: incp    xzr, p15.b
36// CHECK-ENCODING: [0xff,0x89,0x2c,0x25]
37// CHECK-ERROR: instruction requires: sve
38// CHECK-UNKNOWN: ff 89 2c 25 <unknown>
39
40incp    xzr, p15.h
41// CHECK-INST: incp    xzr, p15.h
42// CHECK-ENCODING: [0xff,0x89,0x6c,0x25]
43// CHECK-ERROR: instruction requires: sve
44// CHECK-UNKNOWN: ff 89 6c 25 <unknown>
45
46incp    xzr, p15.s
47// CHECK-INST: incp    xzr, p15.s
48// CHECK-ENCODING: [0xff,0x89,0xac,0x25]
49// CHECK-ERROR: instruction requires: sve
50// CHECK-UNKNOWN: ff 89 ac 25 <unknown>
51
52incp    xzr, p15.d
53// CHECK-INST: incp    xzr, p15.d
54// CHECK-ENCODING: [0xff,0x89,0xec,0x25]
55// CHECK-ERROR: instruction requires: sve
56// CHECK-UNKNOWN: ff 89 ec 25 <unknown>
57
58incp    z31.h, p15
59// CHECK-INST: incp    z31.h, p15
60// CHECK-ENCODING: [0xff,0x81,0x6c,0x25]
61// CHECK-ERROR: instruction requires: sve
62// CHECK-UNKNOWN: ff 81 6c 25 <unknown>
63
64incp    z31.s, p15
65// CHECK-INST: incp    z31.s, p15
66// CHECK-ENCODING: [0xff,0x81,0xac,0x25]
67// CHECK-ERROR: instruction requires: sve
68// CHECK-UNKNOWN: ff 81 ac 25 <unknown>
69
70incp    z31.d, p15
71// CHECK-INST: incp    z31.d, p15
72// CHECK-ENCODING: [0xff,0x81,0xec,0x25]
73// CHECK-ERROR: instruction requires: sve
74// CHECK-UNKNOWN: ff 81 ec 25 <unknown>
75
76
77// --------------------------------------------------------------------------//
78// Test compatibility with MOVPRFX instruction.
79
80movprfx z31, z6
81// CHECK-INST: movprfx	z31, z6
82// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
83// CHECK-ERROR: instruction requires: sve
84// CHECK-UNKNOWN: df bc 20 04 <unknown>
85
86incp    z31.d, p15
87// CHECK-INST: incp	z31.d, p15
88// CHECK-ENCODING: [0xff,0x81,0xec,0x25]
89// CHECK-ERROR: instruction requires: sve
90// CHECK-UNKNOWN: ff 81 ec 25 <unknown>
91