1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ 2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \ 4// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %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// --------------------------------------------------------------------------// 13// Test all possible prefetch operation specifiers 14 15prfd #0, p0, [x0] 16// CHECK-INST: prfd pldl1keep, p0, [x0] 17// CHECK-ENCODING: [0x00,0x60,0xc0,0x85] 18// CHECK-ERROR: instruction requires: sve or sme 19// CHECK-UNKNOWN: 85c06000 <unknown> 20 21prfd pldl1keep, p0, [x0] 22// CHECK-INST: prfd pldl1keep, p0, [x0] 23// CHECK-ENCODING: [0x00,0x60,0xc0,0x85] 24// CHECK-ERROR: instruction requires: sve or sme 25// CHECK-UNKNOWN: 85c06000 <unknown> 26 27prfd #1, p0, [x0] 28// CHECK-INST: prfd pldl1strm, p0, [x0] 29// CHECK-ENCODING: [0x01,0x60,0xc0,0x85] 30// CHECK-ERROR: instruction requires: sve or sme 31// CHECK-UNKNOWN: 85c06001 <unknown> 32 33prfd pldl1strm, p0, [x0] 34// CHECK-INST: prfd pldl1strm, p0, [x0] 35// CHECK-ENCODING: [0x01,0x60,0xc0,0x85] 36// CHECK-ERROR: instruction requires: sve or sme 37// CHECK-UNKNOWN: 85c06001 <unknown> 38 39prfd #2, p0, [x0] 40// CHECK-INST: prfd pldl2keep, p0, [x0] 41// CHECK-ENCODING: [0x02,0x60,0xc0,0x85] 42// CHECK-ERROR: instruction requires: sve or sme 43// CHECK-UNKNOWN: 85c06002 <unknown> 44 45prfd pldl2keep, p0, [x0] 46// CHECK-INST: prfd pldl2keep, p0, [x0] 47// CHECK-ENCODING: [0x02,0x60,0xc0,0x85] 48// CHECK-ERROR: instruction requires: sve or sme 49// CHECK-UNKNOWN: 85c06002 <unknown> 50 51prfd #3, p0, [x0] 52// CHECK-INST: prfd pldl2strm, p0, [x0] 53// CHECK-ENCODING: [0x03,0x60,0xc0,0x85] 54// CHECK-ERROR: instruction requires: sve or sme 55// CHECK-UNKNOWN: 85c06003 <unknown> 56 57prfd pldl2strm, p0, [x0] 58// CHECK-INST: prfd pldl2strm, p0, [x0] 59// CHECK-ENCODING: [0x03,0x60,0xc0,0x85] 60// CHECK-ERROR: instruction requires: sve or sme 61// CHECK-UNKNOWN: 85c06003 <unknown> 62 63prfd #4, p0, [x0] 64// CHECK-INST: prfd pldl3keep, p0, [x0] 65// CHECK-ENCODING: [0x04,0x60,0xc0,0x85] 66// CHECK-ERROR: instruction requires: sve or sme 67// CHECK-UNKNOWN: 85c06004 <unknown> 68 69prfd pldl3keep, p0, [x0] 70// CHECK-INST: prfd pldl3keep, p0, [x0] 71// CHECK-ENCODING: [0x04,0x60,0xc0,0x85] 72// CHECK-ERROR: instruction requires: sve or sme 73// CHECK-UNKNOWN: 85c06004 <unknown> 74 75prfd #5, p0, [x0] 76// CHECK-INST: prfd pldl3strm, p0, [x0] 77// CHECK-ENCODING: [0x05,0x60,0xc0,0x85] 78// CHECK-ERROR: instruction requires: sve or sme 79// CHECK-UNKNOWN: 85c06005 <unknown> 80 81prfd pldl3strm, p0, [x0] 82// CHECK-INST: prfd pldl3strm, p0, [x0] 83// CHECK-ENCODING: [0x05,0x60,0xc0,0x85] 84// CHECK-ERROR: instruction requires: sve or sme 85// CHECK-UNKNOWN: 85c06005 <unknown> 86 87prfd #6, p0, [x0] 88// CHECK-INST: prfd #6, p0, [x0] 89// CHECK-ENCODING: [0x06,0x60,0xc0,0x85] 90// CHECK-ERROR: instruction requires: sve or sme 91// CHECK-UNKNOWN: 85c06006 <unknown> 92 93prfd #7, p0, [x0] 94// CHECK-INST: prfd #7, p0, [x0] 95// CHECK-ENCODING: [0x07,0x60,0xc0,0x85] 96// CHECK-ERROR: instruction requires: sve or sme 97// CHECK-UNKNOWN: 85c06007 <unknown> 98 99prfd #8, p0, [x0] 100// CHECK-INST: prfd pstl1keep, p0, [x0] 101// CHECK-ENCODING: [0x08,0x60,0xc0,0x85] 102// CHECK-ERROR: instruction requires: sve or sme 103// CHECK-UNKNOWN: 85c06008 <unknown> 104 105prfd pstl1keep, p0, [x0] 106// CHECK-INST: prfd pstl1keep, p0, [x0] 107// CHECK-ENCODING: [0x08,0x60,0xc0,0x85] 108// CHECK-ERROR: instruction requires: sve or sme 109// CHECK-UNKNOWN: 85c06008 <unknown> 110 111prfd #9, p0, [x0] 112// CHECK-INST: prfd pstl1strm, p0, [x0] 113// CHECK-ENCODING: [0x09,0x60,0xc0,0x85] 114// CHECK-ERROR: instruction requires: sve or sme 115// CHECK-UNKNOWN: 85c06009 <unknown> 116 117prfd pstl1strm, p0, [x0] 118// CHECK-INST: prfd pstl1strm, p0, [x0] 119// CHECK-ENCODING: [0x09,0x60,0xc0,0x85] 120// CHECK-ERROR: instruction requires: sve or sme 121// CHECK-UNKNOWN: 85c06009 <unknown> 122 123prfd #10, p0, [x0] 124// CHECK-INST: prfd pstl2keep, p0, [x0] 125// CHECK-ENCODING: [0x0a,0x60,0xc0,0x85] 126// CHECK-ERROR: instruction requires: sve or sme 127// CHECK-UNKNOWN: 85c0600a <unknown> 128 129prfd pstl2keep, p0, [x0] 130// CHECK-INST: prfd pstl2keep, p0, [x0] 131// CHECK-ENCODING: [0x0a,0x60,0xc0,0x85] 132// CHECK-ERROR: instruction requires: sve or sme 133// CHECK-UNKNOWN: 85c0600a <unknown> 134 135prfd #11, p0, [x0] 136// CHECK-INST: prfd pstl2strm, p0, [x0] 137// CHECK-ENCODING: [0x0b,0x60,0xc0,0x85] 138// CHECK-ERROR: instruction requires: sve or sme 139// CHECK-UNKNOWN: 85c0600b <unknown> 140 141prfd pstl2strm, p0, [x0] 142// CHECK-INST: prfd pstl2strm, p0, [x0] 143// CHECK-ENCODING: [0x0b,0x60,0xc0,0x85] 144// CHECK-ERROR: instruction requires: sve or sme 145// CHECK-UNKNOWN: 85c0600b <unknown> 146 147prfd #12, p0, [x0] 148// CHECK-INST: prfd pstl3keep, p0, [x0] 149// CHECK-ENCODING: [0x0c,0x60,0xc0,0x85] 150// CHECK-ERROR: instruction requires: sve or sme 151// CHECK-UNKNOWN: 85c0600c <unknown> 152 153prfd pstl3keep, p0, [x0] 154// CHECK-INST: prfd pstl3keep, p0, [x0] 155// CHECK-ENCODING: [0x0c,0x60,0xc0,0x85] 156// CHECK-ERROR: instruction requires: sve or sme 157// CHECK-UNKNOWN: 85c0600c <unknown> 158 159prfd #13, p0, [x0] 160// CHECK-INST: prfd pstl3strm, p0, [x0] 161// CHECK-ENCODING: [0x0d,0x60,0xc0,0x85] 162// CHECK-ERROR: instruction requires: sve or sme 163// CHECK-UNKNOWN: 85c0600d <unknown> 164 165prfd pstl3strm, p0, [x0] 166// CHECK-INST: prfd pstl3strm, p0, [x0] 167// CHECK-ENCODING: [0x0d,0x60,0xc0,0x85] 168// CHECK-ERROR: instruction requires: sve or sme 169// CHECK-UNKNOWN: 85c0600d <unknown> 170 171prfd #14, p0, [x0] 172// CHECK-INST: prfd #14, p0, [x0] 173// CHECK-ENCODING: [0x0e,0x60,0xc0,0x85] 174// CHECK-ERROR: instruction requires: sve or sme 175// CHECK-UNKNOWN: 85c0600e <unknown> 176 177prfd #15, p0, [x0] 178// CHECK-INST: prfd #15, p0, [x0] 179// CHECK-ENCODING: [0x0f,0x60,0xc0,0x85] 180// CHECK-ERROR: instruction requires: sve or sme 181// CHECK-UNKNOWN: 85c0600f <unknown> 182 183// --------------------------------------------------------------------------// 184// Test addressing modes 185 186prfd pldl1strm, p0, [x0, #-32, mul vl] 187// CHECK-INST: prfd pldl1strm, p0, [x0, #-32, mul vl] 188// CHECK-ENCODING: [0x01,0x60,0xe0,0x85] 189// CHECK-ERROR: instruction requires: sve or sme 190// CHECK-UNKNOWN: 85e06001 191 192prfd pldl1strm, p0, [x0, #31, mul vl] 193// CHECK-INST: prfd pldl1strm, p0, [x0, #31, mul vl] 194// CHECK-ENCODING: [0x01,0x60,0xdf,0x85] 195// CHECK-ERROR: instruction requires: sve or sme 196// CHECK-UNKNOWN: 85df6001 197