| 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: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s 2>&1 \ |
| 6 |
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR |
| 7 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 8 |
// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST |
| 9 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 10 |
// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 11 |
|
| 12 |
// Test instruction variants that aren't legal in streaming mode. |
| 13 |
|
| 14 |
// --------------------------------------------------------------------------// |
| 15 |
// Test addressing modes |
| 16 |
|
| 17 |
prfb pldl1keep, p0, [x0, z0.s, uxtw] |
| 18 |
// CHECK-INST: prfb pldl1keep, p0, [x0, z0.s, uxtw] |
| 19 |
// CHECK-ENCODING: [0x00,0x00,0x20,0x84] |
| 20 |
// CHECK-ERROR: instruction requires: sve |
| 21 |
// CHECK-UNKNOWN: 84200000 <unknown> |
| 22 |
|
| 23 |
prfb pldl3strm, p5, [x10, z21.s, uxtw] |
| 24 |
// CHECK-INST: prfb pldl3strm, p5, [x10, z21.s, uxtw] |
| 25 |
// CHECK-ENCODING: [0x45,0x15,0x35,0x84] |
| 26 |
// CHECK-ERROR: instruction requires: sve |
| 27 |
// CHECK-UNKNOWN: 84351545 <unknown> |
| 28 |
|
| 29 |
prfb pldl1keep, p0, [x0, z0.d, uxtw] |
| 30 |
// CHECK-INST: prfb pldl1keep, p0, [x0, z0.d, uxtw] |
| 31 |
// CHECK-ENCODING: [0x00,0x00,0x20,0xc4] |
| 32 |
// CHECK-ERROR: instruction requires: sve |
| 33 |
// CHECK-UNKNOWN: c4200000 <unknown> |
| 34 |
|
| 35 |
prfb pldl3strm, p5, [x10, z21.d, sxtw] |
| 36 |
// CHECK-INST: prfb pldl3strm, p5, [x10, z21.d, sxtw] |
| 37 |
// CHECK-ENCODING: [0x45,0x15,0x75,0xc4] |
| 38 |
// CHECK-ERROR: instruction requires: sve |
| 39 |
// CHECK-UNKNOWN: c4751545 <unknown> |
| 40 |
|
| 41 |
prfb pldl1keep, p0, [x0, z0.d] |
| 42 |
// CHECK-INST: prfb pldl1keep, p0, [x0, z0.d] |
| 43 |
// CHECK-ENCODING: [0x00,0x80,0x60,0xc4] |
| 44 |
// CHECK-ERROR: instruction requires: sve |
| 45 |
// CHECK-UNKNOWN: c4608000 <unknown> |
| 46 |
|
| 47 |
prfb #7, p3, [z13.s, #0] |
| 48 |
// CHECK-INST: prfb #7, p3, [z13.s] |
| 49 |
// CHECK-ENCODING: [0xa7,0xed,0x00,0x84] |
| 50 |
// CHECK-ERROR: instruction requires: sve |
| 51 |
// CHECK-UNKNOWN: 8400eda7 <unknown> |
| 52 |
|
| 53 |
prfb #7, p3, [z13.s, #31] |
| 54 |
// CHECK-INST: prfb #7, p3, [z13.s, #31] |
| 55 |
// CHECK-ENCODING: [0xa7,0xed,0x1f,0x84] |
| 56 |
// CHECK-ERROR: instruction requires: sve |
| 57 |
// CHECK-UNKNOWN: 841feda7 <unknown> |
| 58 |
|
| 59 |
prfb pldl3strm, p5, [z10.d, #0] |
| 60 |
// CHECK-INST: prfb pldl3strm, p5, [z10.d] |
| 61 |
// CHECK-ENCODING: [0x45,0xf5,0x00,0xc4] |
| 62 |
// CHECK-ERROR: instruction requires: sve |
| 63 |
// CHECK-UNKNOWN: c400f545 <unknown> |
| 64 |
|
| 65 |
prfb pldl3strm, p5, [z10.d, #31] |
| 66 |
// CHECK-INST: prfb pldl3strm, p5, [z10.d, #31] |
| 67 |
// CHECK-ENCODING: [0x45,0xf5,0x1f,0xc4] |
| 68 |
// CHECK-ERROR: instruction requires: sve |
| 69 |
// CHECK-UNKNOWN: c41ff545 <unknown> |