805 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 12mov z0.b, w013// CHECK-INST: mov z0.b, w014// CHECK-ENCODING: [0x00,0x38,0x20,0x05]15// CHECK-ERROR: instruction requires: sve or sme16// CHECK-UNKNOWN: 05203800 <unknown>17 18mov z0.h, w019// CHECK-INST: mov z0.h, w020// CHECK-ENCODING: [0x00,0x38,0x60,0x05]21// CHECK-ERROR: instruction requires: sve or sme22// CHECK-UNKNOWN: 05603800 <unknown>23 24mov z0.s, w025// CHECK-INST: mov z0.s, w026// CHECK-ENCODING: [0x00,0x38,0xa0,0x05]27// CHECK-ERROR: instruction requires: sve or sme28// CHECK-UNKNOWN: 05a03800 <unknown>29 30mov z0.d, x031// CHECK-INST: mov z0.d, x032// CHECK-ENCODING: [0x00,0x38,0xe0,0x05]33// CHECK-ERROR: instruction requires: sve or sme34// CHECK-UNKNOWN: 05e03800 <unknown>35 36mov z31.h, wsp37// CHECK-INST: mov z31.h, wsp38// CHECK-ENCODING: [0xff,0x3b,0x60,0x05]39// CHECK-ERROR: instruction requires: sve or sme40// CHECK-UNKNOWN: 05603bff <unknown>41 42mov z31.s, wsp43// CHECK-INST: mov z31.s, wsp44// CHECK-ENCODING: [0xff,0x3b,0xa0,0x05]45// CHECK-ERROR: instruction requires: sve or sme46// CHECK-UNKNOWN: 05a03bff <unknown>47 48mov z31.d, sp49// CHECK-INST: mov z31.d, sp50// CHECK-ENCODING: [0xff,0x3b,0xe0,0x05]51// CHECK-ERROR: instruction requires: sve or sme52// CHECK-UNKNOWN: 05e03bff <unknown>53 54mov z31.b, wsp55// CHECK-INST: mov z31.b, wsp56// CHECK-ENCODING: [0xff,0x3b,0x20,0x05]57// CHECK-ERROR: instruction requires: sve or sme58// CHECK-UNKNOWN: 05203bff <unknown>59 60mov z0.d, z0.d61// CHECK-INST: mov z0.d, z0.d62// CHECK-ENCODING: [0x00,0x30,0x60,0x04]63// CHECK-ERROR: instruction requires: sve or sme64// CHECK-UNKNOWN: 04603000 <unknown>65 66mov z31.d, z0.d67// CHECK-INST: mov z31.d, z0.d68// CHECK-ENCODING: [0x1f,0x30,0x60,0x04]69// CHECK-ERROR: instruction requires: sve or sme70// CHECK-UNKNOWN: 0460301f <unknown>71 72mov z5.b, #-12873// CHECK-INST: mov z5.b, #-12874// CHECK-ENCODING: [0x05,0xd0,0x38,0x25]75// CHECK-ERROR: instruction requires: sve or sme76// CHECK-UNKNOWN: 2538d005 <unknown>77 78mov z5.b, #12779// CHECK-INST: mov z5.b, #12780// CHECK-ENCODING: [0xe5,0xcf,0x38,0x25]81// CHECK-ERROR: instruction requires: sve or sme82// CHECK-UNKNOWN: 2538cfe5 <unknown>83 84mov z5.b, #25585// CHECK-INST: mov z5.b, #-186// CHECK-ENCODING: [0xe5,0xdf,0x38,0x25]87// CHECK-ERROR: instruction requires: sve or sme88// CHECK-UNKNOWN: 2538dfe5 <unknown>89 90mov z21.h, #-12891// CHECK-INST: mov z21.h, #-12892// CHECK-ENCODING: [0x15,0xd0,0x78,0x25]93// CHECK-ERROR: instruction requires: sve or sme94// CHECK-UNKNOWN: 2578d015 <unknown>95 96mov z21.h, #-128, lsl #897// CHECK-INST: mov z21.h, #-3276898// CHECK-ENCODING: [0x15,0xf0,0x78,0x25]99// CHECK-ERROR: instruction requires: sve or sme100// CHECK-UNKNOWN: 2578f015 <unknown>101 102mov z21.h, #-32768103// CHECK-INST: mov z21.h, #-32768104// CHECK-ENCODING: [0x15,0xf0,0x78,0x25]105// CHECK-ERROR: instruction requires: sve or sme106// CHECK-UNKNOWN: 2578f015 <unknown>107 108mov z21.h, #127109// CHECK-INST: mov z21.h, #127110// CHECK-ENCODING: [0xf5,0xcf,0x78,0x25]111// CHECK-ERROR: instruction requires: sve or sme112// CHECK-UNKNOWN: 2578cff5 <unknown>113 114mov z21.h, #127, lsl #8115// CHECK-INST: mov z21.h, #32512116// CHECK-ENCODING: [0xf5,0xef,0x78,0x25]117// CHECK-ERROR: instruction requires: sve or sme118// CHECK-UNKNOWN: 2578eff5 <unknown>119 120mov z21.h, #32512121// CHECK-INST: mov z21.h, #32512122// CHECK-ENCODING: [0xf5,0xef,0x78,0x25]123// CHECK-ERROR: instruction requires: sve or sme124// CHECK-UNKNOWN: 2578eff5 <unknown>125 126mov z21.s, #-128127// CHECK-INST: mov z21.s, #-128128// CHECK-ENCODING: [0x15,0xd0,0xb8,0x25]129// CHECK-ERROR: instruction requires: sve or sme130// CHECK-UNKNOWN: 25b8d015 <unknown>131 132mov z21.s, #-128, lsl #8133// CHECK-INST: mov z21.s, #-32768134// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25]135// CHECK-ERROR: instruction requires: sve or sme136// CHECK-UNKNOWN: 25b8f015 <unknown>137 138mov z21.s, #-32768139// CHECK-INST: mov z21.s, #-32768140// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25]141// CHECK-ERROR: instruction requires: sve or sme142// CHECK-UNKNOWN: 25b8f015 <unknown>143 144mov z21.s, #127145// CHECK-INST: mov z21.s, #127146// CHECK-ENCODING: [0xf5,0xcf,0xb8,0x25]147// CHECK-ERROR: instruction requires: sve or sme148// CHECK-UNKNOWN: 25b8cff5 <unknown>149 150mov z21.s, #127, lsl #8151// CHECK-INST: mov z21.s, #32512152// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25]153// CHECK-ERROR: instruction requires: sve or sme154// CHECK-UNKNOWN: 25b8eff5 <unknown>155 156mov z21.s, #32512157// CHECK-INST: mov z21.s, #32512158// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25]159// CHECK-ERROR: instruction requires: sve or sme160// CHECK-UNKNOWN: 25b8eff5 <unknown>161 162mov z21.d, #-128163// CHECK-INST: mov z21.d, #-128164// CHECK-ENCODING: [0x15,0xd0,0xf8,0x25]165// CHECK-ERROR: instruction requires: sve or sme166// CHECK-UNKNOWN: 25f8d015 <unknown>167 168mov z21.d, #-128, lsl #8169// CHECK-INST: mov z21.d, #-32768170// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25]171// CHECK-ERROR: instruction requires: sve or sme172// CHECK-UNKNOWN: 25f8f015 <unknown>173 174mov z21.d, #-32768175// CHECK-INST: mov z21.d, #-32768176// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25]177// CHECK-ERROR: instruction requires: sve or sme178// CHECK-UNKNOWN: 25f8f015 <unknown>179 180mov z21.d, #127181// CHECK-INST: mov z21.d, #127182// CHECK-ENCODING: [0xf5,0xcf,0xf8,0x25]183// CHECK-ERROR: instruction requires: sve or sme184// CHECK-UNKNOWN: 25f8cff5 <unknown>185 186mov z21.d, #127, lsl #8187// CHECK-INST: mov z21.d, #32512188// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25]189// CHECK-ERROR: instruction requires: sve or sme190// CHECK-UNKNOWN: 25f8eff5 <unknown>191 192mov z21.d, #32512193// CHECK-INST: mov z21.d, #32512194// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25]195// CHECK-ERROR: instruction requires: sve or sme196// CHECK-UNKNOWN: 25f8eff5 <unknown>197 198mov z0.h, #32768199// CHECK-INST: mov z0.h, #-32768200// CHECK-ENCODING: [0x00,0xf0,0x78,0x25]201// CHECK-ERROR: instruction requires: sve or sme202// CHECK-UNKNOWN: 2578f000 <unknown>203 204mov z0.h, #65280205// CHECK-INST: mov z0.h, #-256206// CHECK-ENCODING: [0xe0,0xff,0x78,0x25]207// CHECK-ERROR: instruction requires: sve or sme208// CHECK-UNKNOWN: 2578ffe0 <unknown>209 210mov z0.h, #-33024211// CHECK-INST: mov z0.h, #32512212// CHECK-ENCODING: [0xe0,0xef,0x78,0x25]213// CHECK-ERROR: instruction requires: sve or sme214// CHECK-UNKNOWN: 2578efe0 <unknown>215 216mov z0.h, #-32769217// CHECK-INST: mov z0.h, #32767218// CHECK-ENCODING: [0xc0,0x05,0xc0,0x05]219// CHECK-ERROR: instruction requires: sve or sme220// CHECK-UNKNOWN: 05c005c0 <unknown>221 222mov z0.s, #-32769223// CHECK-INST: mov z0.s, #0xffff7fff224// CHECK-ENCODING: [0xc0,0x83,0xc0,0x05]225// CHECK-ERROR: instruction requires: sve or sme226// CHECK-UNKNOWN: 05c083c0 <unknown>227 228mov z0.s, #32768229// CHECK-INST: mov z0.s, #32768230// CHECK-ENCODING: [0x00,0x88,0xc0,0x05]231// CHECK-ERROR: instruction requires: sve or sme232// CHECK-UNKNOWN: 05c08800 <unknown>233 234mov z0.d, #-32769235// CHECK-INST: mov z0.d, #0xffffffffffff7fff236// CHECK-ENCODING: [0xc0,0x87,0xc3,0x05]237// CHECK-ERROR: instruction requires: sve or sme238// CHECK-UNKNOWN: 05c387c0 <unknown>239 240mov z0.d, #32768241// CHECK-INST: mov z0.d, #32768242// CHECK-ENCODING: [0x00,0x88,0xc3,0x05]243// CHECK-ERROR: instruction requires: sve or sme244// CHECK-UNKNOWN: 05c38800 <unknown>245 246mov z0.d, #0xe0000000000003ff247// CHECK-INST: mov z0.d, #0xe0000000000003ff248// CHECK-ENCODING: [0x80,0x19,0xc2,0x05]249// CHECK-ERROR: instruction requires: sve or sme250// CHECK-UNKNOWN: 05c21980 <unknown>251 252mov z5.b, p0/z, #-128253// CHECK-INST: mov z5.b, p0/z, #-128254// CHECK-ENCODING: [0x05,0x10,0x10,0x05]255// CHECK-ERROR: instruction requires: sve or sme256// CHECK-UNKNOWN: 05101005 <unknown>257 258mov z5.b, p0/z, #127259// CHECK-INST: mov z5.b, p0/z, #127260// CHECK-ENCODING: [0xe5,0x0f,0x10,0x05]261// CHECK-ERROR: instruction requires: sve or sme262// CHECK-UNKNOWN: 05100fe5 <unknown>263 264mov z5.b, p0/z, #255265// CHECK-INST: mov z5.b, p0/z, #-1266// CHECK-ENCODING: [0xe5,0x1f,0x10,0x05]267// CHECK-ERROR: instruction requires: sve or sme268// CHECK-UNKNOWN: 05101fe5 <unknown>269 270mov z21.h, p0/z, #-128271// CHECK-INST: mov z21.h, p0/z, #-128272// CHECK-ENCODING: [0x15,0x10,0x50,0x05]273// CHECK-ERROR: instruction requires: sve or sme274// CHECK-UNKNOWN: 05501015 <unknown>275 276mov z21.h, p0/z, #-128, lsl #8277// CHECK-INST: mov z21.h, p0/z, #-32768278// CHECK-ENCODING: [0x15,0x30,0x50,0x05]279// CHECK-ERROR: instruction requires: sve or sme280// CHECK-UNKNOWN: 05503015 <unknown>281 282mov z21.h, p0/z, #-32768283// CHECK-INST: mov z21.h, p0/z, #-32768284// CHECK-ENCODING: [0x15,0x30,0x50,0x05]285// CHECK-ERROR: instruction requires: sve or sme286// CHECK-UNKNOWN: 05503015 <unknown>287 288mov z21.h, p0/z, #127289// CHECK-INST: mov z21.h, p0/z, #127290// CHECK-ENCODING: [0xf5,0x0f,0x50,0x05]291// CHECK-ERROR: instruction requires: sve or sme292// CHECK-UNKNOWN: 05500ff5 <unknown>293 294mov z21.h, p0/z, #127, lsl #8295// CHECK-INST: mov z21.h, p0/z, #32512296// CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]297// CHECK-ERROR: instruction requires: sve or sme298// CHECK-UNKNOWN: 05502ff5 <unknown>299 300mov z21.h, p0/z, #32512301// CHECK-INST: mov z21.h, p0/z, #32512302// CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]303// CHECK-ERROR: instruction requires: sve or sme304// CHECK-UNKNOWN: 05502ff5 <unknown>305 306mov z21.s, p0/z, #-128307// CHECK-INST: mov z21.s, p0/z, #-128308// CHECK-ENCODING: [0x15,0x10,0x90,0x05]309// CHECK-ERROR: instruction requires: sve or sme310// CHECK-UNKNOWN: 05901015 <unknown>311 312mov z21.s, p0/z, #-128, lsl #8313// CHECK-INST: mov z21.s, p0/z, #-32768314// CHECK-ENCODING: [0x15,0x30,0x90,0x05]315// CHECK-ERROR: instruction requires: sve or sme316// CHECK-UNKNOWN: 05903015 <unknown>317 318mov z21.s, p0/z, #-32768319// CHECK-INST: mov z21.s, p0/z, #-32768320// CHECK-ENCODING: [0x15,0x30,0x90,0x05]321// CHECK-ERROR: instruction requires: sve or sme322// CHECK-UNKNOWN: 05903015 <unknown>323 324mov z21.s, p0/z, #127325// CHECK-INST: mov z21.s, p0/z, #127326// CHECK-ENCODING: [0xf5,0x0f,0x90,0x05]327// CHECK-ERROR: instruction requires: sve or sme328// CHECK-UNKNOWN: 05900ff5 <unknown>329 330mov z21.s, p0/z, #127, lsl #8331// CHECK-INST: mov z21.s, p0/z, #32512332// CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]333// CHECK-ERROR: instruction requires: sve or sme334// CHECK-UNKNOWN: 05902ff5 <unknown>335 336mov z21.s, p0/z, #32512337// CHECK-INST: mov z21.s, p0/z, #32512338// CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]339// CHECK-ERROR: instruction requires: sve or sme340// CHECK-UNKNOWN: 05902ff5 <unknown>341 342mov z21.d, p0/z, #-128343// CHECK-INST: mov z21.d, p0/z, #-128344// CHECK-ENCODING: [0x15,0x10,0xd0,0x05]345// CHECK-ERROR: instruction requires: sve or sme346// CHECK-UNKNOWN: 05d01015 <unknown>347 348mov z21.d, p0/z, #-128, lsl #8349// CHECK-INST: mov z21.d, p0/z, #-32768350// CHECK-ENCODING: [0x15,0x30,0xd0,0x05]351// CHECK-ERROR: instruction requires: sve or sme352// CHECK-UNKNOWN: 05d03015 <unknown>353 354mov z21.d, p0/z, #-32768355// CHECK-INST: mov z21.d, p0/z, #-32768356// CHECK-ENCODING: [0x15,0x30,0xd0,0x05]357// CHECK-ERROR: instruction requires: sve or sme358// CHECK-UNKNOWN: 05d03015 <unknown>359 360mov z21.d, p0/z, #127361// CHECK-INST: mov z21.d, p0/z, #127362// CHECK-ENCODING: [0xf5,0x0f,0xd0,0x05]363// CHECK-ERROR: instruction requires: sve or sme364// CHECK-UNKNOWN: 05d00ff5 <unknown>365 366mov z21.d, p0/z, #127, lsl #8367// CHECK-INST: mov z21.d, p0/z, #32512368// CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]369// CHECK-ERROR: instruction requires: sve or sme370// CHECK-UNKNOWN: 05d02ff5 <unknown>371 372mov z21.d, p0/z, #32512373// CHECK-INST: mov z21.d, p0/z, #32512374// CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]375// CHECK-ERROR: instruction requires: sve or sme376// CHECK-UNKNOWN: 05d02ff5 <unknown>377 378 379// --------------------------------------------------------------------------//380// Tests where the negative immediate is in bounds when interpreted381// as the element type.382 383mov z0.b, #-129384// CHECK-INST: mov z0.b, #127385// CHECK-ENCODING: [0xe0,0xcf,0x38,0x25]386// CHECK-ERROR: instruction requires: sve or sme387// CHECK-UNKNOWN: 2538cfe0 <unknown>388 389mov z0.h, #-129, lsl #8390// CHECK-INST: mov z0.h, #32512391// CHECK-ENCODING: [0xe0,0xef,0x78,0x25]392// CHECK-ERROR: instruction requires: sve or sme393// CHECK-UNKNOWN: 2578efe0 <unknown>394 395mov z5.h, #0xfffa396// CHECK-INST: mov z5.h, #-6397// CHECK-ENCODING: [0x45,0xdf,0x78,0x25]398// CHECK-ERROR: instruction requires: sve or sme399// CHECK-UNKNOWN: 2578df45 <unknown>400 401mov z5.s, #0xfffffffa402// CHECK-INST: mov z5.s, #-6403// CHECK-ENCODING: [0x45,0xdf,0xb8,0x25]404// CHECK-ERROR: instruction requires: sve or sme405// CHECK-UNKNOWN: 25b8df45 <unknown>406 407mov z5.d, #0xfffffffffffffffa408// CHECK-INST: mov z5.d, #-6409// CHECK-ENCODING: [0x45,0xdf,0xf8,0x25]410// CHECK-ERROR: instruction requires: sve or sme411// CHECK-UNKNOWN: 25f8df45 <unknown>412 413mov z0.b, p0/z, #-129414// CHECK-INST: mov z0.b, p0/z, #127415// CHECK-ENCODING: [0xe0,0x0f,0x10,0x05]416// CHECK-ERROR: instruction requires: sve or sme417// CHECK-UNKNOWN: 05100fe0 <unknown>418 419mov z0.h, p0/z, #-33024420// CHECK-INST: mov z0.h, p0/z, #32512421// CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]422// CHECK-ERROR: instruction requires: sve or sme423// CHECK-UNKNOWN: 05502fe0 <unknown>424 425mov z0.h, p0/z, #-129, lsl #8426// CHECK-INST: mov z0.h, p0/z, #32512427// CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]428// CHECK-ERROR: instruction requires: sve or sme429// CHECK-UNKNOWN: 05502fe0 <unknown>430 431// --------------------------------------------------------------------------//432// Tests for merging variant (/m) and testing the range of predicate (> 7)433// is allowed.434 435mov z5.b, p15/m, #-128436// CHECK-INST: mov z5.b, p15/m, #-128437// CHECK-ENCODING: [0x05,0x50,0x1f,0x05]438// CHECK-ERROR: instruction requires: sve or sme439// CHECK-UNKNOWN: 051f5005 <unknown>440 441mov z21.h, p15/m, #-128442// CHECK-INST: mov z21.h, p15/m, #-128443// CHECK-ENCODING: [0x15,0x50,0x5f,0x05]444// CHECK-ERROR: instruction requires: sve or sme445// CHECK-UNKNOWN: 055f5015 <unknown>446 447mov z21.h, p15/m, #-128, lsl #8448// CHECK-INST: mov z21.h, p15/m, #-32768449// CHECK-ENCODING: [0x15,0x70,0x5f,0x05]450// CHECK-ERROR: instruction requires: sve or sme451// CHECK-UNKNOWN: 055f7015 <unknown>452 453mov z21.s, p15/m, #-128454// CHECK-INST: mov z21.s, p15/m, #-128455// CHECK-ENCODING: [0x15,0x50,0x9f,0x05]456// CHECK-ERROR: instruction requires: sve or sme457// CHECK-UNKNOWN: 059f5015 <unknown>458 459mov z21.s, p15/m, #-128, lsl #8460// CHECK-INST: mov z21.s, p15/m, #-32768461// CHECK-ENCODING: [0x15,0x70,0x9f,0x05]462// CHECK-ERROR: instruction requires: sve or sme463// CHECK-UNKNOWN: 059f7015 <unknown>464 465mov z21.d, p15/m, #-128466// CHECK-INST: mov z21.d, p15/m, #-128467// CHECK-ENCODING: [0x15,0x50,0xdf,0x05]468// CHECK-ERROR: instruction requires: sve or sme469// CHECK-UNKNOWN: 05df5015 <unknown>470 471mov z21.d, p15/m, #-128, lsl #8472// CHECK-INST: mov z21.d, p15/m, #-32768473// CHECK-ENCODING: [0x15,0x70,0xdf,0x05]474// CHECK-ERROR: instruction requires: sve or sme475// CHECK-UNKNOWN: 05df7015 <unknown>476 477// --------------------------------------------------------------------------//478// Tests for indexed variant479 480mov z0.b, z0.b[0]481// CHECK-INST: mov z0.b, b0482// CHECK-ENCODING: [0x00,0x20,0x21,0x05]483// CHECK-ERROR: instruction requires: sve or sme484// CHECK-UNKNOWN: 05212000 <unknown>485 486mov z0.h, z0.h[0]487// CHECK-INST: mov z0.h, h0488// CHECK-ENCODING: [0x00,0x20,0x22,0x05]489// CHECK-ERROR: instruction requires: sve or sme490// CHECK-UNKNOWN: 05222000 <unknown>491 492mov z0.s, z0.s[0]493// CHECK-INST: mov z0.s, s0494// CHECK-ENCODING: [0x00,0x20,0x24,0x05]495// CHECK-ERROR: instruction requires: sve or sme496// CHECK-UNKNOWN: 05242000 <unknown>497 498mov z0.d, z0.d[0]499// CHECK-INST: mov z0.d, d0500// CHECK-ENCODING: [0x00,0x20,0x28,0x05]501// CHECK-ERROR: instruction requires: sve or sme502// CHECK-UNKNOWN: 05282000 <unknown>503 504mov z0.q, z0.q[0]505// CHECK-INST: mov z0.q, q0506// CHECK-ENCODING: [0x00,0x20,0x30,0x05]507// CHECK-ERROR: instruction requires: sve or sme508// CHECK-UNKNOWN: 05302000 <unknown>509 510mov z0.b, b0511// CHECK-INST: mov z0.b, b0512// CHECK-ENCODING: [0x00,0x20,0x21,0x05]513// CHECK-ERROR: instruction requires: sve or sme514// CHECK-UNKNOWN: 05212000 <unknown>515 516mov z0.h, h0517// CHECK-INST: mov z0.h, h0518// CHECK-ENCODING: [0x00,0x20,0x22,0x05]519// CHECK-ERROR: instruction requires: sve or sme520// CHECK-UNKNOWN: 05222000 <unknown>521 522mov z0.s, s0523// CHECK-INST: mov z0.s, s0524// CHECK-ENCODING: [0x00,0x20,0x24,0x05]525// CHECK-ERROR: instruction requires: sve or sme526// CHECK-UNKNOWN: 05242000 <unknown>527 528mov z0.d, d0529// CHECK-INST: mov z0.d, d0530// CHECK-ENCODING: [0x00,0x20,0x28,0x05]531// CHECK-ERROR: instruction requires: sve or sme532// CHECK-UNKNOWN: 05282000 <unknown>533 534mov z0.q, q0535// CHECK-INST: mov z0.q, q0536// CHECK-ENCODING: [0x00,0x20,0x30,0x05]537// CHECK-ERROR: instruction requires: sve or sme538// CHECK-UNKNOWN: 05302000 <unknown>539 540mov z31.b, z31.b[63]541// CHECK-INST: mov z31.b, z31.b[63]542// CHECK-ENCODING: [0xff,0x23,0xff,0x05]543// CHECK-ERROR: instruction requires: sve or sme544// CHECK-UNKNOWN: 05ff23ff <unknown>545 546mov z31.h, z31.h[31]547// CHECK-INST: mov z31.h, z31.h[31]548// CHECK-ENCODING: [0xff,0x23,0xfe,0x05]549// CHECK-ERROR: instruction requires: sve or sme550// CHECK-UNKNOWN: 05fe23ff <unknown>551 552mov z31.s, z31.s[15]553// CHECK-INST: mov z31.s, z31.s[15]554// CHECK-ENCODING: [0xff,0x23,0xfc,0x05]555// CHECK-ERROR: instruction requires: sve or sme556// CHECK-UNKNOWN: 05fc23ff <unknown>557 558mov z31.d, z31.d[7]559// CHECK-INST: mov z31.d, z31.d[7]560// CHECK-ENCODING: [0xff,0x23,0xf8,0x05]561// CHECK-ERROR: instruction requires: sve or sme562// CHECK-UNKNOWN: 05f823ff <unknown>563 564mov z5.q, z17.q[3]565// CHECK-INST: mov z5.q, z17.q[3]566// CHECK-ENCODING: [0x25,0x22,0xf0,0x05]567// CHECK-ERROR: instruction requires: sve or sme568// CHECK-UNKNOWN: 05f02225 <unknown>569 570 571// --------------------------------------------------------------------------//572// Tests for predicated copy of SIMD/FP registers.573 574mov z0.b, p0/m, w0575// CHECK-INST: mov z0.b, p0/m, w0576// CHECK-ENCODING: [0x00,0xa0,0x28,0x05]577// CHECK-ERROR: instruction requires: sve or sme578// CHECK-UNKNOWN: 0528a000 <unknown>579 580mov z0.h, p0/m, w0581// CHECK-INST: mov z0.h, p0/m, w0582// CHECK-ENCODING: [0x00,0xa0,0x68,0x05]583// CHECK-ERROR: instruction requires: sve or sme584// CHECK-UNKNOWN: 0568a000 <unknown>585 586mov z0.s, p0/m, w0587// CHECK-INST: mov z0.s, p0/m, w0588// CHECK-ENCODING: [0x00,0xa0,0xa8,0x05]589// CHECK-ERROR: instruction requires: sve or sme590// CHECK-UNKNOWN: 05a8a000 <unknown>591 592mov z0.d, p0/m, x0593// CHECK-INST: mov z0.d, p0/m, x0594// CHECK-ENCODING: [0x00,0xa0,0xe8,0x05]595// CHECK-ERROR: instruction requires: sve or sme596// CHECK-UNKNOWN: 05e8a000 <unknown>597 598mov z31.b, p7/m, wsp599// CHECK-INST: mov z31.b, p7/m, wsp600// CHECK-ENCODING: [0xff,0xbf,0x28,0x05]601// CHECK-ERROR: instruction requires: sve or sme602// CHECK-UNKNOWN: 0528bfff <unknown>603 604mov z31.h, p7/m, wsp605// CHECK-INST: mov z31.h, p7/m, wsp606// CHECK-ENCODING: [0xff,0xbf,0x68,0x05]607// CHECK-ERROR: instruction requires: sve or sme608// CHECK-UNKNOWN: 0568bfff <unknown>609 610mov z31.s, p7/m, wsp611// CHECK-INST: mov z31.s, p7/m, wsp612// CHECK-ENCODING: [0xff,0xbf,0xa8,0x05]613// CHECK-ERROR: instruction requires: sve or sme614// CHECK-UNKNOWN: 05a8bfff <unknown>615 616mov z31.d, p7/m, sp617// CHECK-INST: mov z31.d, p7/m, sp618// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]619// CHECK-ERROR: instruction requires: sve or sme620// CHECK-UNKNOWN: 05e8bfff <unknown>621 622mov z0.b, p0/m, b0623// CHECK-INST: mov z0.b, p0/m, b0624// CHECK-ENCODING: [0x00,0x80,0x20,0x05]625// CHECK-ERROR: instruction requires: sve or sme626// CHECK-UNKNOWN: 05208000 <unknown>627 628mov z31.b, p7/m, b31629// CHECK-INST: mov z31.b, p7/m, b31630// CHECK-ENCODING: [0xff,0x9f,0x20,0x05]631// CHECK-ERROR: instruction requires: sve or sme632// CHECK-UNKNOWN: 05209fff <unknown>633 634mov z0.h, p0/m, h0635// CHECK-INST: mov z0.h, p0/m, h0636// CHECK-ENCODING: [0x00,0x80,0x60,0x05]637// CHECK-ERROR: instruction requires: sve or sme638// CHECK-UNKNOWN: 05608000 <unknown>639 640mov z31.h, p7/m, h31641// CHECK-INST: mov z31.h, p7/m, h31642// CHECK-ENCODING: [0xff,0x9f,0x60,0x05]643// CHECK-ERROR: instruction requires: sve or sme644// CHECK-UNKNOWN: 05609fff <unknown>645 646mov z0.s, p0/m, s0647// CHECK-INST: mov z0.s, p0/m, s0648// CHECK-ENCODING: [0x00,0x80,0xa0,0x05]649// CHECK-ERROR: instruction requires: sve or sme650// CHECK-UNKNOWN: 05a08000 <unknown>651 652mov z31.s, p7/m, s31653// CHECK-INST: mov z31.s, p7/m, s31654// CHECK-ENCODING: [0xff,0x9f,0xa0,0x05]655// CHECK-ERROR: instruction requires: sve or sme656// CHECK-UNKNOWN: 05a09fff <unknown>657 658mov z0.d, p0/m, d0659// CHECK-INST: mov z0.d, p0/m, d0660// CHECK-ENCODING: [0x00,0x80,0xe0,0x05]661// CHECK-ERROR: instruction requires: sve or sme662// CHECK-UNKNOWN: 05e08000 <unknown>663 664mov z31.d, p7/m, d31665// CHECK-INST: mov z31.d, p7/m, d31666// CHECK-ENCODING: [0xff,0x9f,0xe0,0x05]667// CHECK-ERROR: instruction requires: sve or sme668// CHECK-UNKNOWN: 05e09fff <unknown>669 670mov p0.b, p0/m, p0.b671// CHECK-INST: mov p0.b, p0/m, p0.b672// CHECK-ENCODING: [0x10,0x42,0x00,0x25]673// CHECK-ERROR: instruction requires: sve or sme674// CHECK-UNKNOWN: 25004210 <unknown>675 676mov p15.b, p15/m, p15.b677// CHECK-INST: mov p15.b, p15/m, p15.b678// CHECK-ENCODING: [0xff,0x7f,0x0f,0x25]679// CHECK-ERROR: instruction requires: sve or sme680// CHECK-UNKNOWN: 250f7fff <unknown>681 682mov z31.b, p15/m, z31.b683// CHECK-INST: mov z31.b, p15/m, z31.b684// CHECK-ENCODING: [0xff,0xff,0x3f,0x05]685// CHECK-ERROR: instruction requires: sve or sme686// CHECK-UNKNOWN: 053fffff <unknown>687 688mov z31.h, p15/m, z31.h689// CHECK-INST: mov z31.h, p15/m, z31.h690// CHECK-ENCODING: [0xff,0xff,0x7f,0x05]691// CHECK-ERROR: instruction requires: sve or sme692// CHECK-UNKNOWN: 057fffff <unknown>693 694mov z31.s, p15/m, z31.s695// CHECK-INST: mov z31.s, p15/m, z31.s696// CHECK-ENCODING: [0xff,0xff,0xbf,0x05]697// CHECK-ERROR: instruction requires: sve or sme698// CHECK-UNKNOWN: 05bfffff <unknown>699 700mov z31.d, p15/m, z31.d701// CHECK-INST: mov z31.d, p15/m, z31.d702// CHECK-ENCODING: [0xff,0xff,0xff,0x05]703// CHECK-ERROR: instruction requires: sve or sme704// CHECK-UNKNOWN: 05ffffff <unknown>705 706mov p0.b, p0.b707// CHECK-INST: mov p0.b, p0.b708// CHECK-ENCODING: [0x00,0x40,0x80,0x25]709// CHECK-ERROR: instruction requires: sve or sme710// CHECK-UNKNOWN: 25804000 <unknown>711 712mov p15.b, p15.b713// CHECK-INST: mov p15.b, p15.b714// CHECK-ENCODING: [0xef,0x7d,0x8f,0x25]715// CHECK-ERROR: instruction requires: sve or sme716// CHECK-UNKNOWN: 258f7def <unknown>717 718mov p0.b, p0/z, p0.b719// CHECK-INST: mov p0.b, p0/z, p0.b720// CHECK-ENCODING: [0x00,0x40,0x00,0x25]721// CHECK-ERROR: instruction requires: sve or sme722// CHECK-UNKNOWN: 25004000 <unknown>723 724mov p15.b, p15/z, p15.b725// CHECK-INST: mov p15.b, p15/z, p15.b726// CHECK-ENCODING: [0xef,0x7d,0x0f,0x25]727// CHECK-ERROR: instruction requires: sve or sme728// CHECK-UNKNOWN: 250f7def <unknown>729 730 731// --------------------------------------------------------------------------//732// Test compatibility with MOVPRFX instruction.733 734movprfx z31.d, p7/z, z6.d735// CHECK-INST: movprfx z31.d, p7/z, z6.d736// CHECK-ENCODING: [0xdf,0x3c,0xd0,0x04]737// CHECK-ERROR: instruction requires: sve or sme738// CHECK-UNKNOWN: 04d03cdf <unknown>739 740mov z31.d, p7/m, sp741// CHECK-INST: mov z31.d, p7/m, sp742// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]743// CHECK-ERROR: instruction requires: sve or sme744// CHECK-UNKNOWN: 05e8bfff <unknown>745 746movprfx z31, z6747// CHECK-INST: movprfx z31, z6748// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]749// CHECK-ERROR: instruction requires: sve or sme750// CHECK-UNKNOWN: 0420bcdf <unknown>751 752mov z31.d, p7/m, sp753// CHECK-INST: mov z31.d, p7/m, sp754// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]755// CHECK-ERROR: instruction requires: sve or sme756// CHECK-UNKNOWN: 05e8bfff <unknown>757 758movprfx z21.d, p7/z, z28.d759// CHECK-INST: movprfx z21.d, p7/z, z28.d760// CHECK-ENCODING: [0x95,0x3f,0xd0,0x04]761// CHECK-ERROR: instruction requires: sve or sme762// CHECK-UNKNOWN: 04d03f95 <unknown>763 764mov z21.d, p7/m, #-128, lsl #8765// CHECK-INST: mov z21.d, p7/m, #-32768766// CHECK-ENCODING: [0x15,0x70,0xd7,0x05]767// CHECK-ERROR: instruction requires: sve or sme768// CHECK-UNKNOWN: 05d77015 <unknown>769 770movprfx z21, z28771// CHECK-INST: movprfx z21, z28772// CHECK-ENCODING: [0x95,0xbf,0x20,0x04]773// CHECK-ERROR: instruction requires: sve or sme774// CHECK-UNKNOWN: 0420bf95 <unknown>775 776mov z21.d, p15/m, #-128, lsl #8777// CHECK-INST: mov z21.d, p15/m, #-32768778// CHECK-ENCODING: [0x15,0x70,0xdf,0x05]779// CHECK-ERROR: instruction requires: sve or sme780// CHECK-UNKNOWN: 05df7015 <unknown>781 782movprfx z4.d, p7/z, z6.d783// CHECK-INST: movprfx z4.d, p7/z, z6.d784// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]785// CHECK-ERROR: instruction requires: sve or sme786// CHECK-UNKNOWN: 04d03cc4 <unknown>787 788mov z4.d, p7/m, d31789// CHECK-INST: mov z4.d, p7/m, d31790// CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]791// CHECK-ERROR: instruction requires: sve or sme792// CHECK-UNKNOWN: 05e09fe4 <unknown>793 794movprfx z4, z6795// CHECK-INST: movprfx z4, z6796// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]797// CHECK-ERROR: instruction requires: sve or sme798// CHECK-UNKNOWN: 0420bcc4 <unknown>799 800mov z4.d, p7/m, d31801// CHECK-INST: mov z4.d, p7/m, d31802// CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]803// CHECK-ERROR: instruction requires: sve or sme804// CHECK-UNKNOWN: 05e09fe4 <unknown>805