217 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \4// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \6// RUN: | FileCheck %s --check-prefix=CHECK-ERROR7// 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-INST9// 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-UNKNOWN11 12// --------------------------------------------------------------------------//13// Index (immediate, immediate)14 15index z0.b, #0, #016// CHECK-INST: index z0.b, #0, #017// CHECK-ENCODING: [0x00,0x40,0x20,0x04]18// CHECK-ERROR: instruction requires: sve or sme19// CHECK-UNKNOWN: 04204000 <unknown>20 21index z31.b, #-1, #-122// CHECK-INST: index z31.b, #-1, #-123// CHECK-ENCODING: [0xff,0x43,0x3f,0x04]24// CHECK-ERROR: instruction requires: sve or sme25// CHECK-UNKNOWN: 043f43ff <unknown>26 27index z0.h, #0, #028// CHECK-INST: index z0.h, #0, #029// CHECK-ENCODING: [0x00,0x40,0x60,0x04]30// CHECK-ERROR: instruction requires: sve or sme31// CHECK-UNKNOWN: 04604000 <unknown>32 33index z31.h, #-1, #-134// CHECK-INST: index z31.h, #-1, #-135// CHECK-ENCODING: [0xff,0x43,0x7f,0x04]36// CHECK-ERROR: instruction requires: sve or sme37// CHECK-UNKNOWN: 047f43ff <unknown>38 39index z0.s, #0, #040// CHECK-INST: index z0.s, #0, #041// CHECK-ENCODING: [0x00,0x40,0xa0,0x04]42// CHECK-ERROR: instruction requires: sve or sme43// CHECK-UNKNOWN: 04a04000 <unknown>44 45index z31.s, #-1, #-146// CHECK-INST: index z31.s, #-1, #-147// CHECK-ENCODING: [0xff,0x43,0xbf,0x04]48// CHECK-ERROR: instruction requires: sve or sme49// CHECK-UNKNOWN: 04bf43ff <unknown>50 51index z0.d, #0, #052// CHECK-INST: index z0.d, #0, #053// CHECK-ENCODING: [0x00,0x40,0xe0,0x04]54// CHECK-ERROR: instruction requires: sve or sme55// CHECK-UNKNOWN: 04e04000 <unknown>56 57index z31.d, #-1, #-158// CHECK-INST: index z31.d, #-1, #-159// CHECK-ENCODING: [0xff,0x43,0xff,0x04]60// CHECK-ERROR: instruction requires: sve or sme61// CHECK-UNKNOWN: 04ff43ff <unknown>62 63// --------------------------------------------------------------------------//64// Index (immediate, scalar)65 66index z31.b, #-1, wzr67// CHECK-INST: index z31.b, #-1, wzr68// CHECK-ENCODING: [0xff,0x4b,0x3f,0x04]69// CHECK-ERROR: instruction requires: sve or sme70// CHECK-UNKNOWN: 043f4bff <unknown>71 72index z23.b, #13, w873// CHECK-INST: index z23.b, #13, w874// CHECK-ENCODING: [0xb7,0x49,0x28,0x04]75// CHECK-ERROR: instruction requires: sve or sme76// CHECK-UNKNOWN: 042849b7 <unknown>77 78index z31.h, #-1, wzr79// CHECK-INST: index z31.h, #-1, wzr80// CHECK-ENCODING: [0xff,0x4b,0x7f,0x04]81// CHECK-ERROR: instruction requires: sve or sme82// CHECK-UNKNOWN: 047f4bff <unknown>83 84index z23.h, #13, w885// CHECK-INST: index z23.h, #13, w886// CHECK-ENCODING: [0xb7,0x49,0x68,0x04]87// CHECK-ERROR: instruction requires: sve or sme88// CHECK-UNKNOWN: 046849b7 <unknown>89 90index z31.s, #-1, wzr91// CHECK-INST: index z31.s, #-1, wzr92// CHECK-ENCODING: [0xff,0x4b,0xbf,0x04]93// CHECK-ERROR: instruction requires: sve or sme94// CHECK-UNKNOWN: 04bf4bff <unknown>95 96index z23.s, #13, w897// CHECK-INST: index z23.s, #13, w898// CHECK-ENCODING: [0xb7,0x49,0xa8,0x04]99// CHECK-ERROR: instruction requires: sve or sme100// CHECK-UNKNOWN: 04a849b7 <unknown>101 102index z31.d, #-1, xzr103// CHECK-INST: index z31.d, #-1, xzr104// CHECK-ENCODING: [0xff,0x4b,0xff,0x04]105// CHECK-ERROR: instruction requires: sve or sme106// CHECK-UNKNOWN: 04ff4bff <unknown>107 108index z23.d, #13, x8109// CHECK-INST: index z23.d, #13, x8110// CHECK-ENCODING: [0xb7,0x49,0xe8,0x04]111// CHECK-ERROR: instruction requires: sve or sme112// CHECK-UNKNOWN: 04e849b7 <unknown>113 114 115// --------------------------------------------------------------------------//116// Index (scalar, immediate)117 118index z31.b, wzr, #-1119// CHECK-INST: index z31.b, wzr, #-1120// CHECK-ENCODING: [0xff,0x47,0x3f,0x04]121// CHECK-ERROR: instruction requires: sve or sme122// CHECK-UNKNOWN: 043f47ff <unknown>123 124index z23.b, w13, #8125// CHECK-INST: index z23.b, w13, #8126// CHECK-ENCODING: [0xb7,0x45,0x28,0x04]127// CHECK-ERROR: instruction requires: sve or sme128// CHECK-UNKNOWN: 042845b7 <unknown>129 130index z31.h, wzr, #-1131// CHECK-INST: index z31.h, wzr, #-1132// CHECK-ENCODING: [0xff,0x47,0x7f,0x04]133// CHECK-ERROR: instruction requires: sve or sme134// CHECK-UNKNOWN: 047f47ff <unknown>135 136index z23.h, w13, #8137// CHECK-INST: index z23.h, w13, #8138// CHECK-ENCODING: [0xb7,0x45,0x68,0x04]139// CHECK-ERROR: instruction requires: sve or sme140// CHECK-UNKNOWN: 046845b7 <unknown>141 142index z31.s, wzr, #-1143// CHECK-INST: index z31.s, wzr, #-1144// CHECK-ENCODING: [0xff,0x47,0xbf,0x04]145// CHECK-ERROR: instruction requires: sve or sme146// CHECK-UNKNOWN: 04bf47ff <unknown>147 148index z23.s, w13, #8149// CHECK-INST: index z23.s, w13, #8150// CHECK-ENCODING: [0xb7,0x45,0xa8,0x04]151// CHECK-ERROR: instruction requires: sve or sme152// CHECK-UNKNOWN: 04a845b7 <unknown>153 154index z31.d, xzr, #-1155// CHECK-INST: index z31.d, xzr, #-1156// CHECK-ENCODING: [0xff,0x47,0xff,0x04]157// CHECK-ERROR: instruction requires: sve or sme158// CHECK-UNKNOWN: 04ff47ff <unknown>159 160index z23.d, x13, #8161// CHECK-INST: index z23.d, x13, #8162// CHECK-ENCODING: [0xb7,0x45,0xe8,0x04]163// CHECK-ERROR: instruction requires: sve or sme164// CHECK-UNKNOWN: 04e845b7 <unknown>165 166 167// --------------------------------------------------------------------------//168// Index (scalar, scalar)169 170index z31.b, wzr, wzr171// CHECK-INST: index z31.b, wzr, wzr172// CHECK-ENCODING: [0xff,0x4f,0x3f,0x04]173// CHECK-ERROR: instruction requires: sve or sme174// CHECK-UNKNOWN: 043f4fff <unknown>175 176index z21.b, w10, w21177// CHECK-INST: index z21.b, w10, w21178// CHECK-ENCODING: [0x55,0x4d,0x35,0x04]179// CHECK-ERROR: instruction requires: sve or sme180// CHECK-UNKNOWN: 04354d55 <unknown>181 182index z31.h, wzr, wzr183// CHECK-INST: index z31.h, wzr, wzr184// CHECK-ENCODING: [0xff,0x4f,0x7f,0x04]185// CHECK-ERROR: instruction requires: sve or sme186// CHECK-UNKNOWN: 047f4fff <unknown>187 188index z0.h, w0, w0189// CHECK-INST: index z0.h, w0, w0190// CHECK-ENCODING: [0x00,0x4c,0x60,0x04]191// CHECK-ERROR: instruction requires: sve or sme192// CHECK-UNKNOWN: 04604c00 <unknown>193 194index z31.s, wzr, wzr195// CHECK-INST: index z31.s, wzr, wzr196// CHECK-ENCODING: [0xff,0x4f,0xbf,0x04]197// CHECK-ERROR: instruction requires: sve or sme198// CHECK-UNKNOWN: 04bf4fff <unknown>199 200index z21.s, w10, w21201// CHECK-INST: index z21.s, w10, w21202// CHECK-ENCODING: [0x55,0x4d,0xb5,0x04]203// CHECK-ERROR: instruction requires: sve or sme204// CHECK-UNKNOWN: 04b54d55 <unknown>205 206index z31.d, xzr, xzr207// CHECK-INST: index z31.d, xzr, xzr208// CHECK-ENCODING: [0xff,0x4f,0xff,0x04]209// CHECK-ERROR: instruction requires: sve or sme210// CHECK-UNKNOWN: 04ff4fff <unknown>211 212index z21.d, x10, x21213// CHECK-INST: index z21.d, x10, x21214// CHECK-ENCODING: [0x55,0x4d,0xf5,0x04]215// CHECK-ERROR: instruction requires: sve or sme216// CHECK-UNKNOWN: 04f54d55 <unknown>217