219 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 12lsl z0.b, z0.b, #013// CHECK-INST: lsl z0.b, z0.b, #014// CHECK-ENCODING: [0x00,0x9c,0x28,0x04]15// CHECK-ERROR: instruction requires: sve or sme16// CHECK-UNKNOWN: 04289c00 <unknown>17 18lsl z31.b, z31.b, #719// CHECK-INST: lsl z31.b, z31.b, #720// CHECK-ENCODING: [0xff,0x9f,0x2f,0x04]21// CHECK-ERROR: instruction requires: sve or sme22// CHECK-UNKNOWN: 042f9fff <unknown>23 24lsl z0.h, z0.h, #025// CHECK-INST: lsl z0.h, z0.h, #026// CHECK-ENCODING: [0x00,0x9c,0x30,0x04]27// CHECK-ERROR: instruction requires: sve or sme28// CHECK-UNKNOWN: 04309c00 <unknown>29 30lsl z31.h, z31.h, #1531// CHECK-INST: lsl z31.h, z31.h, #1532// CHECK-ENCODING: [0xff,0x9f,0x3f,0x04]33// CHECK-ERROR: instruction requires: sve or sme34// CHECK-UNKNOWN: 043f9fff <unknown>35 36lsl z0.s, z0.s, #037// CHECK-INST: lsl z0.s, z0.s, #038// CHECK-ENCODING: [0x00,0x9c,0x60,0x04]39// CHECK-ERROR: instruction requires: sve or sme40// CHECK-UNKNOWN: 04609c00 <unknown>41 42lsl z31.s, z31.s, #3143// CHECK-INST: lsl z31.s, z31.s, #3144// CHECK-ENCODING: [0xff,0x9f,0x7f,0x04]45// CHECK-ERROR: instruction requires: sve or sme46// CHECK-UNKNOWN: 047f9fff <unknown>47 48lsl z0.d, z0.d, #049// CHECK-INST: lsl z0.d, z0.d, #050// CHECK-ENCODING: [0x00,0x9c,0xa0,0x04]51// CHECK-ERROR: instruction requires: sve or sme52// CHECK-UNKNOWN: 04a09c00 <unknown>53 54lsl z31.d, z31.d, #6355// CHECK-INST: lsl z31.d, z31.d, #6356// CHECK-ENCODING: [0xff,0x9f,0xff,0x04]57// CHECK-ERROR: instruction requires: sve or sme58// CHECK-UNKNOWN: 04ff9fff <unknown>59 60lsl z0.b, p0/m, z0.b, #061// CHECK-INST: lsl z0.b, p0/m, z0.b, #062// CHECK-ENCODING: [0x00,0x81,0x03,0x04]63// CHECK-ERROR: instruction requires: sve or sme64// CHECK-UNKNOWN: 04038100 <unknown>65 66lsl z31.b, p0/m, z31.b, #767// CHECK-INST: lsl z31.b, p0/m, z31.b, #768// CHECK-ENCODING: [0xff,0x81,0x03,0x04]69// CHECK-ERROR: instruction requires: sve or sme70// CHECK-UNKNOWN: 040381ff <unknown>71 72lsl z0.h, p0/m, z0.h, #073// CHECK-INST: lsl z0.h, p0/m, z0.h, #074// CHECK-ENCODING: [0x00,0x82,0x03,0x04]75// CHECK-ERROR: instruction requires: sve or sme76// CHECK-UNKNOWN: 04038200 <unknown>77 78lsl z31.h, p0/m, z31.h, #1579// CHECK-INST: lsl z31.h, p0/m, z31.h, #1580// CHECK-ENCODING: [0xff,0x83,0x03,0x04]81// CHECK-ERROR: instruction requires: sve or sme82// CHECK-UNKNOWN: 040383ff <unknown>83 84lsl z0.s, p0/m, z0.s, #085// CHECK-INST: lsl z0.s, p0/m, z0.s, #086// CHECK-ENCODING: [0x00,0x80,0x43,0x04]87// CHECK-ERROR: instruction requires: sve or sme88// CHECK-UNKNOWN: 04438000 <unknown>89 90lsl z31.s, p0/m, z31.s, #3191// CHECK-INST: lsl z31.s, p0/m, z31.s, #3192// CHECK-ENCODING: [0xff,0x83,0x43,0x04]93// CHECK-ERROR: instruction requires: sve or sme94// CHECK-UNKNOWN: 044383ff <unknown>95 96lsl z0.d, p0/m, z0.d, #097// CHECK-INST: lsl z0.d, p0/m, z0.d, #098// CHECK-ENCODING: [0x00,0x80,0x83,0x04]99// CHECK-ERROR: instruction requires: sve or sme100// CHECK-UNKNOWN: 04838000 <unknown>101 102lsl z31.d, p0/m, z31.d, #63103// CHECK-INST: lsl z31.d, p0/m, z31.d, #63104// CHECK-ENCODING: [0xff,0x83,0xc3,0x04]105// CHECK-ERROR: instruction requires: sve or sme106// CHECK-UNKNOWN: 04c383ff <unknown>107 108lsl z0.b, p0/m, z0.b, z0.b109// CHECK-INST: lsl z0.b, p0/m, z0.b, z0.b110// CHECK-ENCODING: [0x00,0x80,0x13,0x04]111// CHECK-ERROR: instruction requires: sve or sme112// CHECK-UNKNOWN: 04138000 <unknown>113 114lsl z0.h, p0/m, z0.h, z0.h115// CHECK-INST: lsl z0.h, p0/m, z0.h, z0.h116// CHECK-ENCODING: [0x00,0x80,0x53,0x04]117// CHECK-ERROR: instruction requires: sve or sme118// CHECK-UNKNOWN: 04538000 <unknown>119 120lsl z0.s, p0/m, z0.s, z0.s121// CHECK-INST: lsl z0.s, p0/m, z0.s, z0.s122// CHECK-ENCODING: [0x00,0x80,0x93,0x04]123// CHECK-ERROR: instruction requires: sve or sme124// CHECK-UNKNOWN: 04938000 <unknown>125 126lsl z0.d, p0/m, z0.d, z0.d127// CHECK-INST: lsl z0.d, p0/m, z0.d, z0.d128// CHECK-ENCODING: [0x00,0x80,0xd3,0x04]129// CHECK-ERROR: instruction requires: sve or sme130// CHECK-UNKNOWN: 04d38000 <unknown>131 132lsl z0.b, p0/m, z0.b, z1.d133// CHECK-INST: lsl z0.b, p0/m, z0.b, z1.d134// CHECK-ENCODING: [0x20,0x80,0x1b,0x04]135// CHECK-ERROR: instruction requires: sve or sme136// CHECK-UNKNOWN: 041b8020 <unknown>137 138lsl z0.h, p0/m, z0.h, z1.d139// CHECK-INST: lsl z0.h, p0/m, z0.h, z1.d140// CHECK-ENCODING: [0x20,0x80,0x5b,0x04]141// CHECK-ERROR: instruction requires: sve or sme142// CHECK-UNKNOWN: 045b8020 <unknown>143 144lsl z0.s, p0/m, z0.s, z1.d145// CHECK-INST: lsl z0.s, p0/m, z0.s, z1.d146// CHECK-ENCODING: [0x20,0x80,0x9b,0x04]147// CHECK-ERROR: instruction requires: sve or sme148// CHECK-UNKNOWN: 049b8020 <unknown>149 150lsl z0.b, z1.b, z2.d151// CHECK-INST: lsl z0.b, z1.b, z2.d152// CHECK-ENCODING: [0x20,0x8c,0x22,0x04]153// CHECK-ERROR: instruction requires: sve or sme154// CHECK-UNKNOWN: 04228c20 <unknown>155 156lsl z0.h, z1.h, z2.d157// CHECK-INST: lsl z0.h, z1.h, z2.d158// CHECK-ENCODING: [0x20,0x8c,0x62,0x04]159// CHECK-ERROR: instruction requires: sve or sme160// CHECK-UNKNOWN: 04628c20 <unknown>161 162lsl z0.s, z1.s, z2.d163// CHECK-INST: lsl z0.s, z1.s, z2.d164// CHECK-ENCODING: [0x20,0x8c,0xa2,0x04]165// CHECK-ERROR: instruction requires: sve or sme166// CHECK-UNKNOWN: 04a28c20 <unknown>167 168 169// --------------------------------------------------------------------------//170// Test compatibility with MOVPRFX instruction.171 172movprfx z31.d, p0/z, z6.d173// CHECK-INST: movprfx z31.d, p0/z, z6.d174// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04]175// CHECK-ERROR: instruction requires: sve or sme176// CHECK-UNKNOWN: 04d020df <unknown>177 178lsl z31.d, p0/m, z31.d, #63179// CHECK-INST: lsl z31.d, p0/m, z31.d, #63180// CHECK-ENCODING: [0xff,0x83,0xc3,0x04]181// CHECK-ERROR: instruction requires: sve or sme182// CHECK-UNKNOWN: 04c383ff <unknown>183 184movprfx z31, z6185// CHECK-INST: movprfx z31, z6186// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]187// CHECK-ERROR: instruction requires: sve or sme188// CHECK-UNKNOWN: 0420bcdf <unknown>189 190lsl z31.d, p0/m, z31.d, #63191// CHECK-INST: lsl z31.d, p0/m, z31.d, #63192// CHECK-ENCODING: [0xff,0x83,0xc3,0x04]193// CHECK-ERROR: instruction requires: sve or sme194// CHECK-UNKNOWN: 04c383ff <unknown>195 196movprfx z0.s, p0/z, z7.s197// CHECK-INST: movprfx z0.s, p0/z, z7.s198// CHECK-ENCODING: [0xe0,0x20,0x90,0x04]199// CHECK-ERROR: instruction requires: sve or sme200// CHECK-UNKNOWN: 049020e0 <unknown>201 202lsl z0.s, p0/m, z0.s, z1.d203// CHECK-INST: lsl z0.s, p0/m, z0.s, z1.d204// CHECK-ENCODING: [0x20,0x80,0x9b,0x04]205// CHECK-ERROR: instruction requires: sve or sme206// CHECK-UNKNOWN: 049b8020 <unknown>207 208movprfx z0, z7209// CHECK-INST: movprfx z0, z7210// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]211// CHECK-ERROR: instruction requires: sve or sme212// CHECK-UNKNOWN: 0420bce0 <unknown>213 214lsl z0.s, p0/m, z0.s, z1.d215// CHECK-INST: lsl z0.s, p0/m, z0.s, z1.d216// CHECK-ENCODING: [0x20,0x80,0x9b,0x04]217// CHECK-ERROR: instruction requires: sve or sme218// CHECK-UNKNOWN: 049b8020 <unknown>219