262 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \4// RUN: | FileCheck %s --check-prefix=CHECK-ERROR5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2p2 < %s \6// RUN: | llvm-objdump -d --mattr=+sme2p2 - | FileCheck %s --check-prefix=CHECK-INST7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2p2 < %s \8// RUN: | llvm-objdump -d --mattr=-sme2p2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN9// Disassemble encoding and check the re-encoding (-show-encoding) matches.10// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %s \11// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \12// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2p2 -disassemble -show-encoding \13// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST14 15// Multiple and single, 2 regs16 17// 16-bit elements18 19fmul {z0.h-z1.h}, {z0.h-z1.h}, z0.h // 11000001-01100000-11101000-0000000020// CHECK-INST: fmul { z0.h, z1.h }, { z0.h, z1.h }, z0.h21// CHECK-ENCODING: [0x00,0xe8,0x60,0xc1]22// CHECK-ERROR: instruction requires: sme2p223// CHECK-UNKNOWN: c160e800 <unknown>24 25fmul {z20.h-z21.h}, {z10.h-z11.h}, z10.h // 11000001-01110100-11101001-0101010026// CHECK-INST: fmul { z20.h, z21.h }, { z10.h, z11.h }, z10.h27// CHECK-ENCODING: [0x54,0xe9,0x74,0xc1]28// CHECK-ERROR: instruction requires: sme2p229// CHECK-UNKNOWN: c174e954 <unknown>30 31fmul {z30.h-z31.h}, {z30.h-z31.h}, z15.h // 11000001-01111110-11101011-1101111032// CHECK-INST: fmul { z30.h, z31.h }, { z30.h, z31.h }, z15.h33// CHECK-ENCODING: [0xde,0xeb,0x7e,0xc1]34// CHECK-ERROR: instruction requires: sme2p235// CHECK-UNKNOWN: c17eebde <unknown>36 37// 32-bit elements38 39fmul {z0.s-z1.s}, {z0.s-z1.s}, z0.s // 11000001-10100000-11101000-0000000040// CHECK-INST: fmul { z0.s, z1.s }, { z0.s, z1.s }, z0.s41// CHECK-ENCODING: [0x00,0xe8,0xa0,0xc1]42// CHECK-ERROR: instruction requires: sme2p243// CHECK-UNKNOWN: c1a0e800 <unknown>44 45fmul {z20.s-z21.s}, {z10.s-z11.s}, z10.s // 11000001-10110100-11101001-0101010046// CHECK-INST: fmul { z20.s, z21.s }, { z10.s, z11.s }, z10.s47// CHECK-ENCODING: [0x54,0xe9,0xb4,0xc1]48// CHECK-ERROR: instruction requires: sme2p249// CHECK-UNKNOWN: c1b4e954 <unknown>50 51fmul {z30.s-z31.s}, {z30.s-z31.s}, z15.s // 11000001-10111110-11101011-1101111052// CHECK-INST: fmul { z30.s, z31.s }, { z30.s, z31.s }, z15.s53// CHECK-ENCODING: [0xde,0xeb,0xbe,0xc1]54// CHECK-ERROR: instruction requires: sme2p255// CHECK-UNKNOWN: c1beebde <unknown>56 57// 64-bit elements58 59fmul {z0.d-z1.d}, {z0.d-z1.d}, z0.d // 11000001-11100000-11101000-0000000060// CHECK-INST: fmul { z0.d, z1.d }, { z0.d, z1.d }, z0.d61// CHECK-ENCODING: [0x00,0xe8,0xe0,0xc1]62// CHECK-ERROR: instruction requires: sme2p263// CHECK-UNKNOWN: c1e0e800 <unknown>64 65fmul {z20.d-z21.d}, {z10.d-z11.d}, z10.d // 11000001-11110100-11101001-0101010066// CHECK-INST: fmul { z20.d, z21.d }, { z10.d, z11.d }, z10.d67// CHECK-ENCODING: [0x54,0xe9,0xf4,0xc1]68// CHECK-ERROR: instruction requires: sme2p269// CHECK-UNKNOWN: c1f4e954 <unknown>70 71fmul {z30.d-z31.d}, {z30.d-z31.d}, z15.d // 11000001-11111110-11101011-1101111072// CHECK-INST: fmul { z30.d, z31.d }, { z30.d, z31.d }, z15.d73// CHECK-ENCODING: [0xde,0xeb,0xfe,0xc1]74// CHECK-ERROR: instruction requires: sme2p275// CHECK-UNKNOWN: c1feebde <unknown>76 77// Multiple and single, 4 regs78 79// 16-bit elements80 81fmul {z0.h-z3.h}, {z0.h-z3.h}, z0.h // 11000001-01100001-11101000-0000000082// CHECK-INST: fmul { z0.h - z3.h }, { z0.h - z3.h }, z0.h83// CHECK-ENCODING: [0x00,0xe8,0x61,0xc1]84// CHECK-ERROR: instruction requires: sme2p285// CHECK-UNKNOWN: c161e800 <unknown>86 87fmul {z20.h-z23.h}, {z8.h-z11.h}, z10.h // 11000001-01110101-11101001-0001010088// CHECK-INST: fmul { z20.h - z23.h }, { z8.h - z11.h }, z10.h89// CHECK-ENCODING: [0x14,0xe9,0x75,0xc1]90// CHECK-ERROR: instruction requires: sme2p291// CHECK-UNKNOWN: c175e914 <unknown>92 93fmul {z28.h-z31.h}, {z28.h-z31.h}, z15.h // 11000001-01111111-11101011-1001110094// CHECK-INST: fmul { z28.h - z31.h }, { z28.h - z31.h }, z15.h95// CHECK-ENCODING: [0x9c,0xeb,0x7f,0xc1]96// CHECK-ERROR: instruction requires: sme2p297// CHECK-UNKNOWN: c17feb9c <unknown>98 99// 32-bit elements100 101fmul {z0.s-z3.s}, {z0.s-z3.s}, z0.s // 11000001-10100001-11101000-00000000102// CHECK-INST: fmul { z0.s - z3.s }, { z0.s - z3.s }, z0.s103// CHECK-ENCODING: [0x00,0xe8,0xa1,0xc1]104// CHECK-ERROR: instruction requires: sme2p2105// CHECK-UNKNOWN: c1a1e800 <unknown>106 107fmul {z20.s-z23.s}, {z8.s-z11.s}, z10.s // 11000001-10110101-11101001-00010100108// CHECK-INST: fmul { z20.s - z23.s }, { z8.s - z11.s }, z10.s109// CHECK-ENCODING: [0x14,0xe9,0xb5,0xc1]110// CHECK-ERROR: instruction requires: sme2p2111// CHECK-UNKNOWN: c1b5e914 <unknown>112 113fmul {z28.s-z31.s}, {z28.s-z31.s}, z15.s // 11000001-10111111-11101011-10011100114// CHECK-INST: fmul { z28.s - z31.s }, { z28.s - z31.s }, z15.s115// CHECK-ENCODING: [0x9c,0xeb,0xbf,0xc1]116// CHECK-ERROR: instruction requires: sme2p2117// CHECK-UNKNOWN: c1bfeb9c <unknown>118 119// 64-bit elements120 121fmul {z0.d-z3.d}, {z0.d-z3.d}, z0.d // 11000001-11100001-11101000-00000000122// CHECK-INST: fmul { z0.d - z3.d }, { z0.d - z3.d }, z0.d123// CHECK-ENCODING: [0x00,0xe8,0xe1,0xc1]124// CHECK-ERROR: instruction requires: sme2p2125// CHECK-UNKNOWN: c1e1e800 <unknown>126 127fmul {z20.d-z23.d}, {z8.d-z11.d}, z10.d // 11000001-11110101-11101001-00010100128// CHECK-INST: fmul { z20.d - z23.d }, { z8.d - z11.d }, z10.d129// CHECK-ENCODING: [0x14,0xe9,0xf5,0xc1]130// CHECK-ERROR: instruction requires: sme2p2131// CHECK-UNKNOWN: c1f5e914 <unknown>132 133fmul {z28.d-z31.d}, {z28.d-z31.d}, z15.d // 11000001-11111111-11101011-10011100134// CHECK-INST: fmul { z28.d - z31.d }, { z28.d - z31.d }, z15.d135// CHECK-ENCODING: [0x9c,0xeb,0xff,0xc1]136// CHECK-ERROR: instruction requires: sme2p2137// CHECK-UNKNOWN: c1ffeb9c <unknown>138 139// Multiple, 2 regs140 141// 16-bit elements142 143fmul {z0.h-z1.h}, {z0.h-z1.h}, {z0.h-z1.h} // 11000001-01100000-11100100-00000000144// CHECK-INST: fmul { z0.h, z1.h }, { z0.h, z1.h }, { z0.h, z1.h }145// CHECK-ENCODING: [0x00,0xe4,0x60,0xc1]146// CHECK-ERROR: instruction requires: sme2p2147// CHECK-UNKNOWN: c160e400 <unknown>148 149fmul {z20.h-z21.h}, {z10.h-z11.h}, {z20.h-z21.h} // 11000001-01110100-11100101-01010100150// CHECK-INST: fmul { z20.h, z21.h }, { z10.h, z11.h }, { z20.h, z21.h }151// CHECK-ENCODING: [0x54,0xe5,0x74,0xc1]152// CHECK-ERROR: instruction requires: sme2p2153// CHECK-UNKNOWN: c174e554 <unknown>154 155fmul {z30.h-z31.h}, {z30.h-z31.h}, {z30.h-z31.h} // 11000001-01111110-11100111-11011110156// CHECK-INST: fmul { z30.h, z31.h }, { z30.h, z31.h }, { z30.h, z31.h }157// CHECK-ENCODING: [0xde,0xe7,0x7e,0xc1]158// CHECK-ERROR: instruction requires: sme2p2159// CHECK-UNKNOWN: c17ee7de <unknown>160 161// 32-bit elememnts162 163fmul {z0.s-z1.s}, {z0.s-z1.s}, {z0.s-z1.s} // 11000001-10100000-11100100-00000000164// CHECK-INST: fmul { z0.s, z1.s }, { z0.s, z1.s }, { z0.s, z1.s }165// CHECK-ENCODING: [0x00,0xe4,0xa0,0xc1]166// CHECK-ERROR: instruction requires: sme2p2167// CHECK-UNKNOWN: c1a0e400 <unknown>168 169fmul {z20.s-z21.s}, {z10.s-z11.s}, {z20.s-z21.s} // 11000001-10110100-11100101-01010100170// CHECK-INST: fmul { z20.s, z21.s }, { z10.s, z11.s }, { z20.s, z21.s }171// CHECK-ENCODING: [0x54,0xe5,0xb4,0xc1]172// CHECK-ERROR: instruction requires: sme2p2173// CHECK-UNKNOWN: c1b4e554 <unknown>174 175fmul {z30.s-z31.s}, {z30.s-z31.s}, {z30.s-z31.s} // 11000001-10111110-11100111-11011110176// CHECK-INST: fmul { z30.s, z31.s }, { z30.s, z31.s }, { z30.s, z31.s }177// CHECK-ENCODING: [0xde,0xe7,0xbe,0xc1]178// CHECK-ERROR: instruction requires: sme2p2179// CHECK-UNKNOWN: c1bee7de <unknown>180 181// 64-bit elements182 183fmul {z0.d-z1.d}, {z0.d-z1.d}, {z0.d-z1.d} // 11000001-11100000-11100100-00000000184// CHECK-INST: fmul { z0.d, z1.d }, { z0.d, z1.d }, { z0.d, z1.d }185// CHECK-ENCODING: [0x00,0xe4,0xe0,0xc1]186// CHECK-ERROR: instruction requires: sme2p2187// CHECK-UNKNOWN: c1e0e400 <unknown>188 189fmul {z20.d-z21.d}, {z10.d-z11.d}, {z20.d-z21.d} // 11000001-11110100-11100101-01010100190// CHECK-INST: fmul { z20.d, z21.d }, { z10.d, z11.d }, { z20.d, z21.d }191// CHECK-ENCODING: [0x54,0xe5,0xf4,0xc1]192// CHECK-ERROR: instruction requires: sme2p2193// CHECK-UNKNOWN: c1f4e554 <unknown>194 195fmul {z30.d-z31.d}, {z30.d-z31.d}, {z30.d-z31.d} // 11000001-11111110-11100111-11011110196// CHECK-INST: fmul { z30.d, z31.d }, { z30.d, z31.d }, { z30.d, z31.d }197// CHECK-ENCODING: [0xde,0xe7,0xfe,0xc1]198// CHECK-ERROR: instruction requires: sme2p2199// CHECK-UNKNOWN: c1fee7de <unknown>200 201// Multiple, 4 regs202 203// 16-bit elements204 205fmul {z0.h-z3.h}, {z0.h-z3.h}, {z0.h-z3.h} // 11000001-01100001-11100100-00000000206// CHECK-INST: fmul { z0.h - z3.h }, { z0.h - z3.h }, { z0.h - z3.h }207// CHECK-ENCODING: [0x00,0xe4,0x61,0xc1]208// CHECK-ERROR: instruction requires: sme2p2209// CHECK-UNKNOWN: c161e400 <unknown>210 211fmul {z20.h-z23.h}, {z8.h-z11.h}, {z20.h-z23.h} // 11000001-01110101-11100101-00010100212// CHECK-INST: fmul { z20.h - z23.h }, { z8.h - z11.h }, { z20.h - z23.h }213// CHECK-ENCODING: [0x14,0xe5,0x75,0xc1]214// CHECK-ERROR: instruction requires: sme2p2215// CHECK-UNKNOWN: c175e514 <unknown>216 217fmul {z28.h-z31.h}, {z28.h-z31.h}, {z28.h-z31.h} // 11000001-01111101-11100111-10011100218// CHECK-INST: fmul { z28.h - z31.h }, { z28.h - z31.h }, { z28.h - z31.h }219// CHECK-ENCODING: [0x9c,0xe7,0x7d,0xc1]220// CHECK-ERROR: instruction requires: sme2p2221// CHECK-UNKNOWN: c17de79c <unknown>222 223// 32-bit elements224 225fmul {z0.s-z3.s}, {z0.s-z3.s}, {z0.s-z3.s} // 11000001-10100001-11100100-00000000226// CHECK-INST: fmul { z0.s - z3.s }, { z0.s - z3.s }, { z0.s - z3.s }227// CHECK-ENCODING: [0x00,0xe4,0xa1,0xc1]228// CHECK-ERROR: instruction requires: sme2p2229// CHECK-UNKNOWN: c1a1e400 <unknown>230 231fmul {z20.s-z23.s}, {z8.s-z11.s}, {z20.s-z23.s} // 11000001-10110101-11100101-00010100232// CHECK-INST: fmul { z20.s - z23.s }, { z8.s - z11.s }, { z20.s - z23.s }233// CHECK-ENCODING: [0x14,0xe5,0xb5,0xc1]234// CHECK-ERROR: instruction requires: sme2p2235// CHECK-UNKNOWN: c1b5e514 <unknown>236 237fmul {z28.s-z31.s}, {z28.s-z31.s}, {z28.s-z31.s} // 11000001-10111101-11100111-10011100238// CHECK-INST: fmul { z28.s - z31.s }, { z28.s - z31.s }, { z28.s - z31.s }239// CHECK-ENCODING: [0x9c,0xe7,0xbd,0xc1]240// CHECK-ERROR: instruction requires: sme2p2241// CHECK-UNKNOWN: c1bde79c <unknown>242 243// 64-bit elements244 245fmul {z0.d-z3.d}, {z0.d-z3.d}, {z0.d-z3.d} // 11000001-11100001-11100100-00000000246// CHECK-INST: fmul { z0.d - z3.d }, { z0.d - z3.d }, { z0.d - z3.d }247// CHECK-ENCODING: [0x00,0xe4,0xe1,0xc1]248// CHECK-ERROR: instruction requires: sme2p2249// CHECK-UNKNOWN: c1e1e400 <unknown>250 251fmul {z20.d-z23.d}, {z8.d-z11.d}, {z20.d-z23.d} // 11000001-11110101-11100101-00010100252// CHECK-INST: fmul { z20.d - z23.d }, { z8.d - z11.d }, { z20.d - z23.d }253// CHECK-ENCODING: [0x14,0xe5,0xf5,0xc1]254// CHECK-ERROR: instruction requires: sme2p2255// CHECK-UNKNOWN: c1f5e514 <unknown>256 257fmul {z28.d-z31.d}, {z28.d-z31.d}, {z28.d-z31.d} // 11000001-11111101-11100111-10011100258// CHECK-INST: fmul { z28.d - z31.d }, { z28.d - z31.d }, { z28.d - z31.d }259// CHECK-ENCODING: [0x9c,0xe7,0xfd,0xc1]260// CHECK-ERROR: instruction requires: sme2p2261// CHECK-UNKNOWN: c1fde79c <unknown>262