brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.0 KiB · 5111c8b Raw
328 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 12add     z31.s, z31.s, z31.s13// CHECK-INST: add     z31.s, z31.s, z31.s14// CHECK-ENCODING: [0xff,0x03,0xbf,0x04]15// CHECK-ERROR: instruction requires: sve or sme16// CHECK-UNKNOWN: 04bf03ff <unknown>17 18add     z23.d, z13.d, z8.d19// CHECK-INST: add     z23.d, z13.d, z8.d20// CHECK-ENCODING: [0xb7,0x01,0xe8,0x04]21// CHECK-ERROR: instruction requires: sve or sme22// CHECK-UNKNOWN: 04e801b7 <unknown>23 24add     z23.b, p3/m, z23.b, z13.b25// CHECK-INST: add     z23.b, p3/m, z23.b, z13.b26// CHECK-ENCODING: [0xb7,0x0d,0x00,0x04]27// CHECK-ERROR: instruction requires: sve or sme28// CHECK-UNKNOWN: 04000db7 <unknown>29 30add     z0.s, z0.s, z0.s31// CHECK-INST: add     z0.s, z0.s, z0.s32// CHECK-ENCODING: [0x00,0x00,0xa0,0x04]33// CHECK-ERROR: instruction requires: sve or sme34// CHECK-UNKNOWN: 04a00000 <unknown>35 36add     z31.d, z31.d, z31.d37// CHECK-INST: add     z31.d, z31.d, z31.d38// CHECK-ENCODING: [0xff,0x03,0xff,0x04]39// CHECK-ERROR: instruction requires: sve or sme40// CHECK-UNKNOWN: 04ff03ff <unknown>41 42add     z21.b, z10.b, z21.b43// CHECK-INST: add     z21.b, z10.b, z21.b44// CHECK-ENCODING: [0x55,0x01,0x35,0x04]45// CHECK-ERROR: instruction requires: sve or sme46// CHECK-UNKNOWN: 04350155 <unknown>47 48add     z31.b, z31.b, z31.b49// CHECK-INST: add     z31.b, z31.b, z31.b50// CHECK-ENCODING: [0xff,0x03,0x3f,0x04]51// CHECK-ERROR: instruction requires: sve or sme52// CHECK-UNKNOWN: 043f03ff <unknown>53 54add     z0.h, p0/m, z0.h, z0.h55// CHECK-INST: add     z0.h, p0/m, z0.h, z0.h56// CHECK-ENCODING: [0x00,0x00,0x40,0x04]57// CHECK-ERROR: instruction requires: sve or sme58// CHECK-UNKNOWN: 04400000 <unknown>59 60add     z0.h, z0.h, z0.h61// CHECK-INST: add     z0.h, z0.h, z0.h62// CHECK-ENCODING: [0x00,0x00,0x60,0x04]63// CHECK-ERROR: instruction requires: sve or sme64// CHECK-UNKNOWN: 04600000 <unknown>65 66add     z0.b, p0/m, z0.b, z0.b67// CHECK-INST: add     z0.b, p0/m, z0.b, z0.b68// CHECK-ENCODING: [0x00,0x00,0x00,0x04]69// CHECK-ERROR: instruction requires: sve or sme70// CHECK-UNKNOWN: 04000000 <unknown>71 72add     z0.s, p0/m, z0.s, z0.s73// CHECK-INST: add     z0.s, p0/m, z0.s, z0.s74// CHECK-ENCODING: [0x00,0x00,0x80,0x04]75// CHECK-ERROR: instruction requires: sve or sme76// CHECK-UNKNOWN: 04800000 <unknown>77 78add     z23.b, z13.b, z8.b79// CHECK-INST: add     z23.b, z13.b, z8.b80// CHECK-ENCODING: [0xb7,0x01,0x28,0x04]81// CHECK-ERROR: instruction requires: sve or sme82// CHECK-UNKNOWN: 042801b7 <unknown>83 84add     z0.d, z0.d, z0.d85// CHECK-INST: add     z0.d, z0.d, z0.d86// CHECK-ENCODING: [0x00,0x00,0xe0,0x04]87// CHECK-ERROR: instruction requires: sve or sme88// CHECK-UNKNOWN: 04e00000 <unknown>89 90add     z0.d, p0/m, z0.d, z0.d91// CHECK-INST: add     z0.d, p0/m, z0.d, z0.d92// CHECK-ENCODING: [0x00,0x00,0xc0,0x04]93// CHECK-ERROR: instruction requires: sve or sme94// CHECK-UNKNOWN: 04c00000 <unknown>95 96add     z31.h, z31.h, z31.h97// CHECK-INST: add     z31.h, z31.h, z31.h98// CHECK-ENCODING: [0xff,0x03,0x7f,0x04]99// CHECK-ERROR: instruction requires: sve or sme100// CHECK-UNKNOWN: 047f03ff <unknown>101 102add     z0.b, z0.b, z0.b103// CHECK-INST: add     z0.b, z0.b, z0.b104// CHECK-ENCODING: [0x00,0x00,0x20,0x04]105// CHECK-ERROR: instruction requires: sve or sme106// CHECK-UNKNOWN: 04200000 <unknown>107 108add     z21.d, z10.d, z21.d109// CHECK-INST: add     z21.d, z10.d, z21.d110// CHECK-ENCODING: [0x55,0x01,0xf5,0x04]111// CHECK-ERROR: instruction requires: sve or sme112// CHECK-UNKNOWN: 04f50155 <unknown>113 114add     z23.h, p3/m, z23.h, z13.h115// CHECK-INST: add     z23.h, p3/m, z23.h, z13.h116// CHECK-ENCODING: [0xb7,0x0d,0x40,0x04]117// CHECK-ERROR: instruction requires: sve or sme118// CHECK-UNKNOWN: 04400db7 <unknown>119 120add     z23.s, p3/m, z23.s, z13.s121// CHECK-INST: add     z23.s, p3/m, z23.s, z13.s122// CHECK-ENCODING: [0xb7,0x0d,0x80,0x04]123// CHECK-ERROR: instruction requires: sve or sme124// CHECK-UNKNOWN: 04800db7 <unknown>125 126add     z31.s, p7/m, z31.s, z31.s127// CHECK-INST: add     z31.s, p7/m, z31.s, z31.s128// CHECK-ENCODING: [0xff,0x1f,0x80,0x04]129// CHECK-ERROR: instruction requires: sve or sme130// CHECK-UNKNOWN: 04801fff <unknown>131 132add     z21.h, z10.h, z21.h133// CHECK-INST: add     z21.h, z10.h, z21.h134// CHECK-ENCODING: [0x55,0x01,0x75,0x04]135// CHECK-ERROR: instruction requires: sve or sme136// CHECK-UNKNOWN: 04750155 <unknown>137 138add     z23.d, p3/m, z23.d, z13.d139// CHECK-INST: add     z23.d, p3/m, z23.d, z13.d140// CHECK-ENCODING: [0xb7,0x0d,0xc0,0x04]141// CHECK-ERROR: instruction requires: sve or sme142// CHECK-UNKNOWN: 04c00db7 <unknown>143 144add     z21.d, p5/m, z21.d, z10.d145// CHECK-INST: add     z21.d, p5/m, z21.d, z10.d146// CHECK-ENCODING: [0x55,0x15,0xc0,0x04]147// CHECK-ERROR: instruction requires: sve or sme148// CHECK-UNKNOWN: 04c01555 <unknown>149 150add     z21.b, p5/m, z21.b, z10.b151// CHECK-INST: add     z21.b, p5/m, z21.b, z10.b152// CHECK-ENCODING: [0x55,0x15,0x00,0x04]153// CHECK-ERROR: instruction requires: sve or sme154// CHECK-UNKNOWN: 04001555 <unknown>155 156add     z21.s, z10.s, z21.s157// CHECK-INST: add     z21.s, z10.s, z21.s158// CHECK-ENCODING: [0x55,0x01,0xb5,0x04]159// CHECK-ERROR: instruction requires: sve or sme160// CHECK-UNKNOWN: 04b50155 <unknown>161 162add     z21.h, p5/m, z21.h, z10.h163// CHECK-INST: add     z21.h, p5/m, z21.h, z10.h164// CHECK-ENCODING: [0x55,0x15,0x40,0x04]165// CHECK-ERROR: instruction requires: sve or sme166// CHECK-UNKNOWN: 04401555 <unknown>167 168add     z31.h, p7/m, z31.h, z31.h169// CHECK-INST: add     z31.h, p7/m, z31.h, z31.h170// CHECK-ENCODING: [0xff,0x1f,0x40,0x04]171// CHECK-ERROR: instruction requires: sve or sme172// CHECK-UNKNOWN: 04401fff <unknown>173 174add     z23.h, z13.h, z8.h175// CHECK-INST: add     z23.h, z13.h, z8.h176// CHECK-ENCODING: [0xb7,0x01,0x68,0x04]177// CHECK-ERROR: instruction requires: sve or sme178// CHECK-UNKNOWN: 046801b7 <unknown>179 180add     z31.d, p7/m, z31.d, z31.d181// CHECK-INST: add     z31.d, p7/m, z31.d, z31.d182// CHECK-ENCODING: [0xff,0x1f,0xc0,0x04]183// CHECK-ERROR: instruction requires: sve or sme184// CHECK-UNKNOWN: 04c01fff <unknown>185 186add     z21.s, p5/m, z21.s, z10.s187// CHECK-INST: add     z21.s, p5/m, z21.s, z10.s188// CHECK-ENCODING: [0x55,0x15,0x80,0x04]189// CHECK-ERROR: instruction requires: sve or sme190// CHECK-UNKNOWN: 04801555 <unknown>191 192add     z31.b, p7/m, z31.b, z31.b193// CHECK-INST: add     z31.b, p7/m, z31.b, z31.b194// CHECK-ENCODING: [0xff,0x1f,0x00,0x04]195// CHECK-ERROR: instruction requires: sve or sme196// CHECK-UNKNOWN: 04001fff <unknown>197 198add     z23.s, z13.s, z8.s199// CHECK-INST: add     z23.s, z13.s, z8.s200// CHECK-ENCODING: [0xb7,0x01,0xa8,0x04]201// CHECK-ERROR: instruction requires: sve or sme202// CHECK-UNKNOWN: 04a801b7 <unknown>203 204add     z0.b, z0.b, #0205// CHECK-INST: add     z0.b, z0.b, #0206// CHECK-ENCODING: [0x00,0xc0,0x20,0x25]207// CHECK-ERROR: instruction requires: sve or sme208// CHECK-UNKNOWN: 2520c000 <unknown>209 210add     z31.b, z31.b, #255211// CHECK-INST: add     z31.b, z31.b, #255212// CHECK-ENCODING: [0xff,0xdf,0x20,0x25]213// CHECK-ERROR: instruction requires: sve or sme214// CHECK-UNKNOWN: 2520dfff <unknown>215 216add     z0.h, z0.h, #0217// CHECK-INST: add     z0.h, z0.h, #0218// CHECK-ENCODING: [0x00,0xc0,0x60,0x25]219// CHECK-ERROR: instruction requires: sve or sme220// CHECK-UNKNOWN: 2560c000 <unknown>221 222add     z0.h, z0.h, #0, lsl #8223// CHECK-INST: add     z0.h, z0.h, #0, lsl #8224// CHECK-ENCODING: [0x00,0xe0,0x60,0x25]225// CHECK-ERROR: instruction requires: sve or sme226// CHECK-UNKNOWN: 2560e000 <unknown>227 228add     z31.h, z31.h, #255, lsl #8229// CHECK-INST: add     z31.h, z31.h, #65280230// CHECK-ENCODING: [0xff,0xff,0x60,0x25]231// CHECK-ERROR: instruction requires: sve or sme232// CHECK-UNKNOWN: 2560ffff <unknown>233 234add     z31.h, z31.h, #65280235// CHECK-INST: add     z31.h, z31.h, #65280236// CHECK-ENCODING: [0xff,0xff,0x60,0x25]237// CHECK-ERROR: instruction requires: sve or sme238// CHECK-UNKNOWN: 2560ffff <unknown>239 240add     z0.s, z0.s, #0241// CHECK-INST: add     z0.s, z0.s, #0242// CHECK-ENCODING: [0x00,0xc0,0xa0,0x25]243// CHECK-ERROR: instruction requires: sve or sme244// CHECK-UNKNOWN: 25a0c000 <unknown>245 246add     z0.s, z0.s, #0, lsl #8247// CHECK-INST: add     z0.s, z0.s, #0, lsl #8248// CHECK-ENCODING: [0x00,0xe0,0xa0,0x25]249// CHECK-ERROR: instruction requires: sve or sme250// CHECK-UNKNOWN: 25a0e000 <unknown>251 252add     z31.s, z31.s, #255, lsl #8253// CHECK-INST: add     z31.s, z31.s, #65280254// CHECK-ENCODING: [0xff,0xff,0xa0,0x25]255// CHECK-ERROR: instruction requires: sve or sme256// CHECK-UNKNOWN: 25a0ffff <unknown>257 258add     z31.s, z31.s, #65280259// CHECK-INST: add     z31.s, z31.s, #65280260// CHECK-ENCODING: [0xff,0xff,0xa0,0x25]261// CHECK-ERROR: instruction requires: sve or sme262// CHECK-UNKNOWN: 25a0ffff <unknown>263 264add     z0.d, z0.d, #0265// CHECK-INST: add     z0.d, z0.d, #0266// CHECK-ENCODING: [0x00,0xc0,0xe0,0x25]267// CHECK-ERROR: instruction requires: sve or sme268// CHECK-UNKNOWN: 25e0c000 <unknown>269 270add     z0.d, z0.d, #0, lsl #8271// CHECK-INST: add     z0.d, z0.d, #0, lsl #8272// CHECK-ENCODING: [0x00,0xe0,0xe0,0x25]273// CHECK-ERROR: instruction requires: sve or sme274// CHECK-UNKNOWN: 25e0e000 <unknown>275 276add     z31.d, z31.d, #255, lsl #8277// CHECK-INST: add     z31.d, z31.d, #65280278// CHECK-ENCODING: [0xff,0xff,0xe0,0x25]279// CHECK-ERROR: instruction requires: sve or sme280// CHECK-UNKNOWN: 25e0ffff <unknown>281 282add     z31.d, z31.d, #65280283// CHECK-INST: add     z31.d, z31.d, #65280284// CHECK-ENCODING: [0xff,0xff,0xe0,0x25]285// CHECK-ERROR: instruction requires: sve or sme286// CHECK-UNKNOWN: 25e0ffff <unknown>287 288 289 290// --------------------------------------------------------------------------//291// Test compatibility with MOVPRFX instruction.292 293movprfx z4.b, p7/z, z6.b294// CHECK-INST: movprfx	z4.b, p7/z, z6.b295// CHECK-ENCODING: [0xc4,0x3c,0x10,0x04]296// CHECK-ERROR: instruction requires: sve or sme297// CHECK-UNKNOWN: 04103cc4 <unknown>298 299add     z4.b, p7/m, z4.b, z31.b300// CHECK-INST: add	z4.b, p7/m, z4.b, z31.b301// CHECK-ENCODING: [0xe4,0x1f,0x00,0x04]302// CHECK-ERROR: instruction requires: sve or sme303// CHECK-UNKNOWN: 04001fe4 <unknown>304 305movprfx z4, z6306// CHECK-INST: movprfx	z4, z6307// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]308// CHECK-ERROR: instruction requires: sve or sme309// CHECK-UNKNOWN: 0420bcc4 <unknown>310 311add     z4.b, p7/m, z4.b, z31.b312// CHECK-INST: add	z4.b, p7/m, z4.b, z31.b313// CHECK-ENCODING: [0xe4,0x1f,0x00,0x04]314// CHECK-ERROR: instruction requires: sve or sme315// CHECK-UNKNOWN: 04001fe4 <unknown>316 317movprfx z31, z6318// CHECK-INST: movprfx	z31, z6319// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]320// CHECK-ERROR: instruction requires: sve or sme321// CHECK-UNKNOWN: 0420bcdf <unknown>322 323add     z31.d, z31.d, #65280324// CHECK-INST: add	z31.d, z31.d, #65280325// CHECK-ENCODING: [0xff,0xff,0xe0,0x25]326// CHECK-ERROR: instruction requires: sve or sme327// CHECK-UNKNOWN: 25e0ffff <unknown>328