260 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// Test 64-bit form (x0) and its aliases14// ---------------------------------------------------------------------------//15 16sqincb x017// CHECK-INST: sqincb x018// CHECK-ENCODING: [0xe0,0xf3,0x30,0x04]19// CHECK-ERROR: instruction requires: sve or sme20// CHECK-UNKNOWN: 0430f3e0 <unknown>21 22sqincb x0, all23// CHECK-INST: sqincb x024// CHECK-ENCODING: [0xe0,0xf3,0x30,0x04]25// CHECK-ERROR: instruction requires: sve or sme26// CHECK-UNKNOWN: 0430f3e0 <unknown>27 28sqincb x0, all, mul #129// CHECK-INST: sqincb x030// CHECK-ENCODING: [0xe0,0xf3,0x30,0x04]31// CHECK-ERROR: instruction requires: sve or sme32// CHECK-UNKNOWN: 0430f3e0 <unknown>33 34sqincb x0, all, mul #1635// CHECK-INST: sqincb x0, all, mul #1636// CHECK-ENCODING: [0xe0,0xf3,0x3f,0x04]37// CHECK-ERROR: instruction requires: sve or sme38// CHECK-UNKNOWN: 043ff3e0 <unknown>39 40 41// ---------------------------------------------------------------------------//42// Test 32-bit form (x0, w0) and its aliases43// ---------------------------------------------------------------------------//44 45sqincb x0, w046// CHECK-INST: sqincb x0, w047// CHECK-ENCODING: [0xe0,0xf3,0x20,0x04]48// CHECK-ERROR: instruction requires: sve or sme49// CHECK-UNKNOWN: 0420f3e0 <unknown>50 51sqincb x0, w0, all52// CHECK-INST: sqincb x0, w053// CHECK-ENCODING: [0xe0,0xf3,0x20,0x04]54// CHECK-ERROR: instruction requires: sve or sme55// CHECK-UNKNOWN: 0420f3e0 <unknown>56 57sqincb x0, w0, all, mul #158// CHECK-INST: sqincb x0, w059// CHECK-ENCODING: [0xe0,0xf3,0x20,0x04]60// CHECK-ERROR: instruction requires: sve or sme61// CHECK-UNKNOWN: 0420f3e0 <unknown>62 63sqincb x0, w0, all, mul #1664// CHECK-INST: sqincb x0, w0, all, mul #1665// CHECK-ENCODING: [0xe0,0xf3,0x2f,0x04]66// CHECK-ERROR: instruction requires: sve or sme67// CHECK-UNKNOWN: 042ff3e0 <unknown>68 69sqincb x0, w0, pow270// CHECK-INST: sqincb x0, w0, pow271// CHECK-ENCODING: [0x00,0xf0,0x20,0x04]72// CHECK-ERROR: instruction requires: sve or sme73// CHECK-UNKNOWN: 0420f000 <unknown>74 75sqincb x0, w0, pow2, mul #1676// CHECK-INST: sqincb x0, w0, pow2, mul #1677// CHECK-ENCODING: [0x00,0xf0,0x2f,0x04]78// CHECK-ERROR: instruction requires: sve or sme79// CHECK-UNKNOWN: 042ff000 <unknown>80 81 82// ---------------------------------------------------------------------------//83// Test all patterns for 64-bit form84// ---------------------------------------------------------------------------//85 86sqincb x0, pow287// CHECK-INST: sqincb x0, pow288// CHECK-ENCODING: [0x00,0xf0,0x30,0x04]89// CHECK-ERROR: instruction requires: sve or sme90// CHECK-UNKNOWN: 0430f000 <unknown>91 92sqincb x0, vl193// CHECK-INST: sqincb x0, vl194// CHECK-ENCODING: [0x20,0xf0,0x30,0x04]95// CHECK-ERROR: instruction requires: sve or sme96// CHECK-UNKNOWN: 0430f020 <unknown>97 98sqincb x0, vl299// CHECK-INST: sqincb x0, vl2100// CHECK-ENCODING: [0x40,0xf0,0x30,0x04]101// CHECK-ERROR: instruction requires: sve or sme102// CHECK-UNKNOWN: 0430f040 <unknown>103 104sqincb x0, vl3105// CHECK-INST: sqincb x0, vl3106// CHECK-ENCODING: [0x60,0xf0,0x30,0x04]107// CHECK-ERROR: instruction requires: sve or sme108// CHECK-UNKNOWN: 0430f060 <unknown>109 110sqincb x0, vl4111// CHECK-INST: sqincb x0, vl4112// CHECK-ENCODING: [0x80,0xf0,0x30,0x04]113// CHECK-ERROR: instruction requires: sve or sme114// CHECK-UNKNOWN: 0430f080 <unknown>115 116sqincb x0, vl5117// CHECK-INST: sqincb x0, vl5118// CHECK-ENCODING: [0xa0,0xf0,0x30,0x04]119// CHECK-ERROR: instruction requires: sve or sme120// CHECK-UNKNOWN: 0430f0a0 <unknown>121 122sqincb x0, vl6123// CHECK-INST: sqincb x0, vl6124// CHECK-ENCODING: [0xc0,0xf0,0x30,0x04]125// CHECK-ERROR: instruction requires: sve or sme126// CHECK-UNKNOWN: 0430f0c0 <unknown>127 128sqincb x0, vl7129// CHECK-INST: sqincb x0, vl7130// CHECK-ENCODING: [0xe0,0xf0,0x30,0x04]131// CHECK-ERROR: instruction requires: sve or sme132// CHECK-UNKNOWN: 0430f0e0 <unknown>133 134sqincb x0, vl8135// CHECK-INST: sqincb x0, vl8136// CHECK-ENCODING: [0x00,0xf1,0x30,0x04]137// CHECK-ERROR: instruction requires: sve or sme138// CHECK-UNKNOWN: 0430f100 <unknown>139 140sqincb x0, vl16141// CHECK-INST: sqincb x0, vl16142// CHECK-ENCODING: [0x20,0xf1,0x30,0x04]143// CHECK-ERROR: instruction requires: sve or sme144// CHECK-UNKNOWN: 0430f120 <unknown>145 146sqincb x0, vl32147// CHECK-INST: sqincb x0, vl32148// CHECK-ENCODING: [0x40,0xf1,0x30,0x04]149// CHECK-ERROR: instruction requires: sve or sme150// CHECK-UNKNOWN: 0430f140 <unknown>151 152sqincb x0, vl64153// CHECK-INST: sqincb x0, vl64154// CHECK-ENCODING: [0x60,0xf1,0x30,0x04]155// CHECK-ERROR: instruction requires: sve or sme156// CHECK-UNKNOWN: 0430f160 <unknown>157 158sqincb x0, vl128159// CHECK-INST: sqincb x0, vl128160// CHECK-ENCODING: [0x80,0xf1,0x30,0x04]161// CHECK-ERROR: instruction requires: sve or sme162// CHECK-UNKNOWN: 0430f180 <unknown>163 164sqincb x0, vl256165// CHECK-INST: sqincb x0, vl256166// CHECK-ENCODING: [0xa0,0xf1,0x30,0x04]167// CHECK-ERROR: instruction requires: sve or sme168// CHECK-UNKNOWN: 0430f1a0 <unknown>169 170sqincb x0, #14171// CHECK-INST: sqincb x0, #14172// CHECK-ENCODING: [0xc0,0xf1,0x30,0x04]173// CHECK-ERROR: instruction requires: sve or sme174// CHECK-UNKNOWN: 0430f1c0 <unknown>175 176sqincb x0, #15177// CHECK-INST: sqincb x0, #15178// CHECK-ENCODING: [0xe0,0xf1,0x30,0x04]179// CHECK-ERROR: instruction requires: sve or sme180// CHECK-UNKNOWN: 0430f1e0 <unknown>181 182sqincb x0, #16183// CHECK-INST: sqincb x0, #16184// CHECK-ENCODING: [0x00,0xf2,0x30,0x04]185// CHECK-ERROR: instruction requires: sve or sme186// CHECK-UNKNOWN: 0430f200 <unknown>187 188sqincb x0, #17189// CHECK-INST: sqincb x0, #17190// CHECK-ENCODING: [0x20,0xf2,0x30,0x04]191// CHECK-ERROR: instruction requires: sve or sme192// CHECK-UNKNOWN: 0430f220 <unknown>193 194sqincb x0, #18195// CHECK-INST: sqincb x0, #18196// CHECK-ENCODING: [0x40,0xf2,0x30,0x04]197// CHECK-ERROR: instruction requires: sve or sme198// CHECK-UNKNOWN: 0430f240 <unknown>199 200sqincb x0, #19201// CHECK-INST: sqincb x0, #19202// CHECK-ENCODING: [0x60,0xf2,0x30,0x04]203// CHECK-ERROR: instruction requires: sve or sme204// CHECK-UNKNOWN: 0430f260 <unknown>205 206sqincb x0, #20207// CHECK-INST: sqincb x0, #20208// CHECK-ENCODING: [0x80,0xf2,0x30,0x04]209// CHECK-ERROR: instruction requires: sve or sme210// CHECK-UNKNOWN: 0430f280 <unknown>211 212sqincb x0, #21213// CHECK-INST: sqincb x0, #21214// CHECK-ENCODING: [0xa0,0xf2,0x30,0x04]215// CHECK-ERROR: instruction requires: sve or sme216// CHECK-UNKNOWN: 0430f2a0 <unknown>217 218sqincb x0, #22219// CHECK-INST: sqincb x0, #22220// CHECK-ENCODING: [0xc0,0xf2,0x30,0x04]221// CHECK-ERROR: instruction requires: sve or sme222// CHECK-UNKNOWN: 0430f2c0 <unknown>223 224sqincb x0, #23225// CHECK-INST: sqincb x0, #23226// CHECK-ENCODING: [0xe0,0xf2,0x30,0x04]227// CHECK-ERROR: instruction requires: sve or sme228// CHECK-UNKNOWN: 0430f2e0 <unknown>229 230sqincb x0, #24231// CHECK-INST: sqincb x0, #24232// CHECK-ENCODING: [0x00,0xf3,0x30,0x04]233// CHECK-ERROR: instruction requires: sve or sme234// CHECK-UNKNOWN: 0430f300 <unknown>235 236sqincb x0, #25237// CHECK-INST: sqincb x0, #25238// CHECK-ENCODING: [0x20,0xf3,0x30,0x04]239// CHECK-ERROR: instruction requires: sve or sme240// CHECK-UNKNOWN: 0430f320 <unknown>241 242sqincb x0, #26243// CHECK-INST: sqincb x0, #26244// CHECK-ENCODING: [0x40,0xf3,0x30,0x04]245// CHECK-ERROR: instruction requires: sve or sme246// CHECK-UNKNOWN: 0430f340 <unknown>247 248sqincb x0, #27249// CHECK-INST: sqincb x0, #27250// CHECK-ENCODING: [0x60,0xf3,0x30,0x04]251// CHECK-ERROR: instruction requires: sve or sme252// CHECK-UNKNOWN: 0430f360 <unknown>253 254sqincb x0, #28255// CHECK-INST: sqincb x0, #28256// CHECK-ENCODING: [0x80,0xf3,0x30,0x04]257// CHECK-ERROR: instruction requires: sve or sme258// CHECK-UNKNOWN: 0430f380 <unknown>259 260