brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.5 KiB · 670525f Raw
339 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// ---------------------------------------------------------------------------//14// Test 64-bit form (x0) and its aliases15// ---------------------------------------------------------------------------//16uqincd  x017// CHECK-INST: uqincd  x018// CHECK-ENCODING: [0xe0,0xf7,0xf0,0x04]19// CHECK-ERROR: instruction requires: sve or sme20// CHECK-UNKNOWN: 04f0f7e0 <unknown>21 22uqincd  x0, all23// CHECK-INST: uqincd  x024// CHECK-ENCODING: [0xe0,0xf7,0xf0,0x04]25// CHECK-ERROR: instruction requires: sve or sme26// CHECK-UNKNOWN: 04f0f7e0 <unknown>27 28uqincd  x0, all, mul #129// CHECK-INST: uqincd  x030// CHECK-ENCODING: [0xe0,0xf7,0xf0,0x04]31// CHECK-ERROR: instruction requires: sve or sme32// CHECK-UNKNOWN: 04f0f7e0 <unknown>33 34uqincd  x0, all, mul #1635// CHECK-INST: uqincd  x0, all, mul #1636// CHECK-ENCODING: [0xe0,0xf7,0xff,0x04]37// CHECK-ERROR: instruction requires: sve or sme38// CHECK-UNKNOWN: 04fff7e0 <unknown>39 40 41// ---------------------------------------------------------------------------//42// Test 32-bit form (w0) and its aliases43// ---------------------------------------------------------------------------//44 45uqincd  w046// CHECK-INST: uqincd  w047// CHECK-ENCODING: [0xe0,0xf7,0xe0,0x04]48// CHECK-ERROR: instruction requires: sve or sme49// CHECK-UNKNOWN: 04e0f7e0 <unknown>50 51uqincd  w0, all52// CHECK-INST: uqincd  w053// CHECK-ENCODING: [0xe0,0xf7,0xe0,0x04]54// CHECK-ERROR: instruction requires: sve or sme55// CHECK-UNKNOWN: 04e0f7e0 <unknown>56 57uqincd  w0, all, mul #158// CHECK-INST: uqincd  w059// CHECK-ENCODING: [0xe0,0xf7,0xe0,0x04]60// CHECK-ERROR: instruction requires: sve or sme61// CHECK-UNKNOWN: 04e0f7e0 <unknown>62 63uqincd  w0, all, mul #1664// CHECK-INST: uqincd  w0, all, mul #1665// CHECK-ENCODING: [0xe0,0xf7,0xef,0x04]66// CHECK-ERROR: instruction requires: sve or sme67// CHECK-UNKNOWN: 04eff7e0 <unknown>68 69uqincd  w0, pow270// CHECK-INST: uqincd  w0, pow271// CHECK-ENCODING: [0x00,0xf4,0xe0,0x04]72// CHECK-ERROR: instruction requires: sve or sme73// CHECK-UNKNOWN: 04e0f400 <unknown>74 75uqincd  w0, pow2, mul #1676// CHECK-INST: uqincd  w0, pow2, mul #1677// CHECK-ENCODING: [0x00,0xf4,0xef,0x04]78// CHECK-ERROR: instruction requires: sve or sme79// CHECK-UNKNOWN: 04eff400 <unknown>80 81 82// ---------------------------------------------------------------------------//83// Test vector form and aliases.84// ---------------------------------------------------------------------------//85uqincd  z0.d86// CHECK-INST: uqincd  z0.d87// CHECK-ENCODING: [0xe0,0xc7,0xe0,0x04]88// CHECK-ERROR: instruction requires: sve or sme89// CHECK-UNKNOWN: 04e0c7e0 <unknown>90 91uqincd  z0.d, all92// CHECK-INST: uqincd  z0.d93// CHECK-ENCODING: [0xe0,0xc7,0xe0,0x04]94// CHECK-ERROR: instruction requires: sve or sme95// CHECK-UNKNOWN: 04e0c7e0 <unknown>96 97uqincd  z0.d, all, mul #198// CHECK-INST: uqincd  z0.d99// CHECK-ENCODING: [0xe0,0xc7,0xe0,0x04]100// CHECK-ERROR: instruction requires: sve or sme101// CHECK-UNKNOWN: 04e0c7e0 <unknown>102 103uqincd  z0.d, all, mul #16104// CHECK-INST: uqincd  z0.d, all, mul #16105// CHECK-ENCODING: [0xe0,0xc7,0xef,0x04]106// CHECK-ERROR: instruction requires: sve or sme107// CHECK-UNKNOWN: 04efc7e0 <unknown>108 109uqincd  z0.d, pow2110// CHECK-INST: uqincd  z0.d, pow2111// CHECK-ENCODING: [0x00,0xc4,0xe0,0x04]112// CHECK-ERROR: instruction requires: sve or sme113// CHECK-UNKNOWN: 04e0c400 <unknown>114 115uqincd  z0.d, pow2, mul #16116// CHECK-INST: uqincd  z0.d, pow2, mul #16117// CHECK-ENCODING: [0x00,0xc4,0xef,0x04]118// CHECK-ERROR: instruction requires: sve or sme119// CHECK-UNKNOWN: 04efc400 <unknown>120 121 122// ---------------------------------------------------------------------------//123// Test all patterns for 64-bit form124// ---------------------------------------------------------------------------//125 126uqincd  x0, pow2127// CHECK-INST: uqincd  x0, pow2128// CHECK-ENCODING: [0x00,0xf4,0xf0,0x04]129// CHECK-ERROR: instruction requires: sve or sme130// CHECK-UNKNOWN: 04f0f400 <unknown>131 132uqincd  x0, vl1133// CHECK-INST: uqincd  x0, vl1134// CHECK-ENCODING: [0x20,0xf4,0xf0,0x04]135// CHECK-ERROR: instruction requires: sve or sme136// CHECK-UNKNOWN: 04f0f420 <unknown>137 138uqincd  x0, vl2139// CHECK-INST: uqincd  x0, vl2140// CHECK-ENCODING: [0x40,0xf4,0xf0,0x04]141// CHECK-ERROR: instruction requires: sve or sme142// CHECK-UNKNOWN: 04f0f440 <unknown>143 144uqincd  x0, vl3145// CHECK-INST: uqincd  x0, vl3146// CHECK-ENCODING: [0x60,0xf4,0xf0,0x04]147// CHECK-ERROR: instruction requires: sve or sme148// CHECK-UNKNOWN: 04f0f460 <unknown>149 150uqincd  x0, vl4151// CHECK-INST: uqincd  x0, vl4152// CHECK-ENCODING: [0x80,0xf4,0xf0,0x04]153// CHECK-ERROR: instruction requires: sve or sme154// CHECK-UNKNOWN: 04f0f480 <unknown>155 156uqincd  x0, vl5157// CHECK-INST: uqincd  x0, vl5158// CHECK-ENCODING: [0xa0,0xf4,0xf0,0x04]159// CHECK-ERROR: instruction requires: sve or sme160// CHECK-UNKNOWN: 04f0f4a0 <unknown>161 162uqincd  x0, vl6163// CHECK-INST: uqincd  x0, vl6164// CHECK-ENCODING: [0xc0,0xf4,0xf0,0x04]165// CHECK-ERROR: instruction requires: sve or sme166// CHECK-UNKNOWN: 04f0f4c0 <unknown>167 168uqincd  x0, vl7169// CHECK-INST: uqincd  x0, vl7170// CHECK-ENCODING: [0xe0,0xf4,0xf0,0x04]171// CHECK-ERROR: instruction requires: sve or sme172// CHECK-UNKNOWN: 04f0f4e0 <unknown>173 174uqincd  x0, vl8175// CHECK-INST: uqincd  x0, vl8176// CHECK-ENCODING: [0x00,0xf5,0xf0,0x04]177// CHECK-ERROR: instruction requires: sve or sme178// CHECK-UNKNOWN: 04f0f500 <unknown>179 180uqincd  x0, vl16181// CHECK-INST: uqincd  x0, vl16182// CHECK-ENCODING: [0x20,0xf5,0xf0,0x04]183// CHECK-ERROR: instruction requires: sve or sme184// CHECK-UNKNOWN: 04f0f520 <unknown>185 186uqincd  x0, vl32187// CHECK-INST: uqincd  x0, vl32188// CHECK-ENCODING: [0x40,0xf5,0xf0,0x04]189// CHECK-ERROR: instruction requires: sve or sme190// CHECK-UNKNOWN: 04f0f540 <unknown>191 192uqincd  x0, vl64193// CHECK-INST: uqincd  x0, vl64194// CHECK-ENCODING: [0x60,0xf5,0xf0,0x04]195// CHECK-ERROR: instruction requires: sve or sme196// CHECK-UNKNOWN: 04f0f560 <unknown>197 198uqincd  x0, vl128199// CHECK-INST: uqincd  x0, vl128200// CHECK-ENCODING: [0x80,0xf5,0xf0,0x04]201// CHECK-ERROR: instruction requires: sve or sme202// CHECK-UNKNOWN: 04f0f580 <unknown>203 204uqincd  x0, vl256205// CHECK-INST: uqincd  x0, vl256206// CHECK-ENCODING: [0xa0,0xf5,0xf0,0x04]207// CHECK-ERROR: instruction requires: sve or sme208// CHECK-UNKNOWN: 04f0f5a0 <unknown>209 210uqincd  x0, #14211// CHECK-INST: uqincd  x0, #14212// CHECK-ENCODING: [0xc0,0xf5,0xf0,0x04]213// CHECK-ERROR: instruction requires: sve or sme214// CHECK-UNKNOWN: 04f0f5c0 <unknown>215 216uqincd  x0, #15217// CHECK-INST: uqincd  x0, #15218// CHECK-ENCODING: [0xe0,0xf5,0xf0,0x04]219// CHECK-ERROR: instruction requires: sve or sme220// CHECK-UNKNOWN: 04f0f5e0 <unknown>221 222uqincd  x0, #16223// CHECK-INST: uqincd  x0, #16224// CHECK-ENCODING: [0x00,0xf6,0xf0,0x04]225// CHECK-ERROR: instruction requires: sve or sme226// CHECK-UNKNOWN: 04f0f600 <unknown>227 228uqincd  x0, #17229// CHECK-INST: uqincd  x0, #17230// CHECK-ENCODING: [0x20,0xf6,0xf0,0x04]231// CHECK-ERROR: instruction requires: sve or sme232// CHECK-UNKNOWN: 04f0f620 <unknown>233 234uqincd  x0, #18235// CHECK-INST: uqincd  x0, #18236// CHECK-ENCODING: [0x40,0xf6,0xf0,0x04]237// CHECK-ERROR: instruction requires: sve or sme238// CHECK-UNKNOWN: 04f0f640 <unknown>239 240uqincd  x0, #19241// CHECK-INST: uqincd  x0, #19242// CHECK-ENCODING: [0x60,0xf6,0xf0,0x04]243// CHECK-ERROR: instruction requires: sve or sme244// CHECK-UNKNOWN: 04f0f660 <unknown>245 246uqincd  x0, #20247// CHECK-INST: uqincd  x0, #20248// CHECK-ENCODING: [0x80,0xf6,0xf0,0x04]249// CHECK-ERROR: instruction requires: sve or sme250// CHECK-UNKNOWN: 04f0f680 <unknown>251 252uqincd  x0, #21253// CHECK-INST: uqincd  x0, #21254// CHECK-ENCODING: [0xa0,0xf6,0xf0,0x04]255// CHECK-ERROR: instruction requires: sve or sme256// CHECK-UNKNOWN: 04f0f6a0 <unknown>257 258uqincd  x0, #22259// CHECK-INST: uqincd  x0, #22260// CHECK-ENCODING: [0xc0,0xf6,0xf0,0x04]261// CHECK-ERROR: instruction requires: sve or sme262// CHECK-UNKNOWN: 04f0f6c0 <unknown>263 264uqincd  x0, #23265// CHECK-INST: uqincd  x0, #23266// CHECK-ENCODING: [0xe0,0xf6,0xf0,0x04]267// CHECK-ERROR: instruction requires: sve or sme268// CHECK-UNKNOWN: 04f0f6e0 <unknown>269 270uqincd  x0, #24271// CHECK-INST: uqincd  x0, #24272// CHECK-ENCODING: [0x00,0xf7,0xf0,0x04]273// CHECK-ERROR: instruction requires: sve or sme274// CHECK-UNKNOWN: 04f0f700 <unknown>275 276uqincd  x0, #25277// CHECK-INST: uqincd  x0, #25278// CHECK-ENCODING: [0x20,0xf7,0xf0,0x04]279// CHECK-ERROR: instruction requires: sve or sme280// CHECK-UNKNOWN: 04f0f720 <unknown>281 282uqincd  x0, #26283// CHECK-INST: uqincd  x0, #26284// CHECK-ENCODING: [0x40,0xf7,0xf0,0x04]285// CHECK-ERROR: instruction requires: sve or sme286// CHECK-UNKNOWN: 04f0f740 <unknown>287 288uqincd  x0, #27289// CHECK-INST: uqincd  x0, #27290// CHECK-ENCODING: [0x60,0xf7,0xf0,0x04]291// CHECK-ERROR: instruction requires: sve or sme292// CHECK-UNKNOWN: 04f0f760 <unknown>293 294uqincd  x0, #28295// CHECK-INST: uqincd  x0, #28296// CHECK-ENCODING: [0x80,0xf7,0xf0,0x04]297// CHECK-ERROR: instruction requires: sve or sme298// CHECK-UNKNOWN: 04f0f780 <unknown>299 300 301// --------------------------------------------------------------------------//302// Test compatibility with MOVPRFX instruction.303 304movprfx z0, z7305// CHECK-INST: movprfx	z0, z7306// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]307// CHECK-ERROR: instruction requires: sve or sme308// CHECK-UNKNOWN: 0420bce0 <unknown>309 310uqincd  z0.d311// CHECK-INST: uqincd	z0.d312// CHECK-ENCODING: [0xe0,0xc7,0xe0,0x04]313// CHECK-ERROR: instruction requires: sve or sme314// CHECK-UNKNOWN: 04e0c7e0 <unknown>315 316movprfx z0, z7317// CHECK-INST: movprfx	z0, z7318// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]319// CHECK-ERROR: instruction requires: sve or sme320// CHECK-UNKNOWN: 0420bce0 <unknown>321 322uqincd  z0.d, pow2, mul #16323// CHECK-INST: uqincd	z0.d, pow2, mul #16324// CHECK-ENCODING: [0x00,0xc4,0xef,0x04]325// CHECK-ERROR: instruction requires: sve or sme326// CHECK-UNKNOWN: 04efc400 <unknown>327 328movprfx z0, z7329// CHECK-INST: movprfx	z0, z7330// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]331// CHECK-ERROR: instruction requires: sve or sme332// CHECK-UNKNOWN: 0420bce0 <unknown>333 334uqincd  z0.d, pow2335// CHECK-INST: uqincd	z0.d, pow2336// CHECK-ENCODING: [0x00,0xc4,0xe0,0x04]337// CHECK-ERROR: instruction requires: sve or sme338// CHECK-UNKNOWN: 04e0c400 <unknown>339