169 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 -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \10// RUN: | llvm-objdump -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN11 12bic z5.b, z5.b, #0xf913// CHECK-INST: and z5.b, z5.b, #0x614// CHECK-ENCODING: [0x25,0x3e,0x80,0x05]15// CHECK-ERROR: instruction requires: sve or sme16// CHECK-UNKNOWN: 05803e25 <unknown>17 18bic z23.h, z23.h, #0xfff919// CHECK-INST: and z23.h, z23.h, #0x620// CHECK-ENCODING: [0x37,0x7c,0x80,0x05]21// CHECK-ERROR: instruction requires: sve or sme22// CHECK-UNKNOWN: 05807c37 <unknown>23 24bic z0.s, z0.s, #0xfffffff925// CHECK-INST: and z0.s, z0.s, #0x626// CHECK-ENCODING: [0x20,0xf8,0x80,0x05]27// CHECK-ERROR: instruction requires: sve or sme28// CHECK-UNKNOWN: 0580f820 <unknown>29 30bic z0.d, z0.d, #0xfffffffffffffff931// CHECK-INST: and z0.d, z0.d, #0x632// CHECK-ENCODING: [0x20,0xf8,0x83,0x05]33// CHECK-ERROR: instruction requires: sve or sme34// CHECK-UNKNOWN: 0583f820 <unknown>35 36bic z5.b, z5.b, #0x637// CHECK-INST: and z5.b, z5.b, #0xf938// CHECK-ENCODING: [0xa5,0x2e,0x80,0x05]39// CHECK-ERROR: instruction requires: sve or sme40// CHECK-UNKNOWN: 05802ea5 <unknown>41 42bic z23.h, z23.h, #0x643// CHECK-INST: and z23.h, z23.h, #0xfff944// CHECK-ENCODING: [0xb7,0x6d,0x80,0x05]45// CHECK-ERROR: instruction requires: sve or sme46// CHECK-UNKNOWN: 05806db7 <unknown>47 48bic z0.s, z0.s, #0x649// CHECK-INST: and z0.s, z0.s, #0xfffffff950// CHECK-ENCODING: [0xa0,0xeb,0x80,0x05]51// CHECK-ERROR: instruction requires: sve or sme52// CHECK-UNKNOWN: 0580eba0 <unknown>53 54bic z0.d, z0.d, #0x655// CHECK-INST: and z0.d, z0.d, #0xfffffffffffffff956// CHECK-ENCODING: [0xa0,0xef,0x83,0x05]57// CHECK-ERROR: instruction requires: sve or sme58// CHECK-UNKNOWN: 0583efa0 <unknown>59 60bic z0.d, z0.d, z0.d61// CHECK-INST: bic z0.d, z0.d, z0.d62// CHECK-ENCODING: [0x00,0x30,0xe0,0x04]63// CHECK-ERROR: instruction requires: sve or sme64// CHECK-UNKNOWN: 04e03000 <unknown>65 66bic z23.d, z13.d, z8.d67// CHECK-INST: bic z23.d, z13.d, z8.d68// CHECK-ENCODING: [0xb7,0x31,0xe8,0x04]69// CHECK-ERROR: instruction requires: sve or sme70// CHECK-UNKNOWN: 04e831b7 <unknown>71 72bic z31.b, p7/m, z31.b, z31.b73// CHECK-INST: bic z31.b, p7/m, z31.b, z31.b74// CHECK-ENCODING: [0xff,0x1f,0x1b,0x04]75// CHECK-ERROR: instruction requires: sve or sme76// CHECK-UNKNOWN: 041b1fff <unknown>77 78bic z31.h, p7/m, z31.h, z31.h79// CHECK-INST: bic z31.h, p7/m, z31.h, z31.h80// CHECK-ENCODING: [0xff,0x1f,0x5b,0x04]81// CHECK-ERROR: instruction requires: sve or sme82// CHECK-UNKNOWN: 045b1fff <unknown>83 84bic z31.s, p7/m, z31.s, z31.s85// CHECK-INST: bic z31.s, p7/m, z31.s, z31.s86// CHECK-ENCODING: [0xff,0x1f,0x9b,0x04]87// CHECK-ERROR: instruction requires: sve or sme88// CHECK-UNKNOWN: 049b1fff <unknown>89 90bic z31.d, p7/m, z31.d, z31.d91// CHECK-INST: bic z31.d, p7/m, z31.d, z31.d92// CHECK-ENCODING: [0xff,0x1f,0xdb,0x04]93// CHECK-ERROR: instruction requires: sve or sme94// CHECK-UNKNOWN: 04db1fff <unknown>95 96bic p15.b, p15/z, p15.b, p15.b97// CHECK-INST: bic p15.b, p15/z, p15.b, p15.b98// CHECK-ENCODING: [0xff,0x7d,0x0f,0x25]99// CHECK-ERROR: instruction requires: sve or sme100// CHECK-UNKNOWN: 250f7dff <unknown>101 102bic p0.b, p0/z, p0.b, p0.b103// CHECK-INST: bic p0.b, p0/z, p0.b, p0.b104// CHECK-ENCODING: [0x10,0x40,0x00,0x25]105// CHECK-ERROR: instruction requires: sve or sme106// CHECK-UNKNOWN: 25004010 <unknown>107 108 109// --------------------------------------------------------------------------//110// Test aliases.111 112bic z0.s, z0.s, z0.s113// CHECK-INST: bic z0.d, z0.d, z0.d114// CHECK-ENCODING: [0x00,0x30,0xe0,0x04]115// CHECK-ERROR: instruction requires: sve or sme116// CHECK-UNKNOWN: 04e03000 <unknown>117 118bic z0.h, z0.h, z0.h119// CHECK-INST: bic z0.d, z0.d, z0.d120// CHECK-ENCODING: [0x00,0x30,0xe0,0x04]121// CHECK-ERROR: instruction requires: sve or sme122// CHECK-UNKNOWN: 04e03000 <unknown>123 124bic z0.b, z0.b, z0.b125// CHECK-INST: bic z0.d, z0.d, z0.d126// CHECK-ENCODING: [0x00,0x30,0xe0,0x04]127// CHECK-ERROR: instruction requires: sve or sme128// CHECK-UNKNOWN: 04e03000 <unknown>129 130 131// --------------------------------------------------------------------------//132// Test compatibility with MOVPRFX instruction.133 134movprfx z4.d, p7/z, z6.d135// CHECK-INST: movprfx z4.d, p7/z, z6.d136// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]137// CHECK-ERROR: instruction requires: sve or sme138// CHECK-UNKNOWN: 04d03cc4 <unknown>139 140bic z4.d, p7/m, z4.d, z31.d141// CHECK-INST: bic z4.d, p7/m, z4.d, z31.d142// CHECK-ENCODING: [0xe4,0x1f,0xdb,0x04]143// CHECK-ERROR: instruction requires: sve or sme144// CHECK-UNKNOWN: 04db1fe4 <unknown>145 146movprfx z4, z6147// CHECK-INST: movprfx z4, z6148// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]149// CHECK-ERROR: instruction requires: sve or sme150// CHECK-UNKNOWN: 0420bcc4 <unknown>151 152bic z4.d, p7/m, z4.d, z31.d153// CHECK-INST: bic z4.d, p7/m, z4.d, z31.d154// CHECK-ENCODING: [0xe4,0x1f,0xdb,0x04]155// CHECK-ERROR: instruction requires: sve or sme156// CHECK-UNKNOWN: 04db1fe4 <unknown>157 158movprfx z0, z7159// CHECK-INST: movprfx z0, z7160// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]161// CHECK-ERROR: instruction requires: sve or sme162// CHECK-UNKNOWN: 0420bce0 <unknown>163 164bic z0.d, z0.d, #0x6165// CHECK-INST: and z0.d, z0.d, #0xfffffffffffffff9166// CHECK-ENCODING: [0xa0,0xef,0x83,0x05]167// CHECK-ERROR: instruction requires: sve or sme168// CHECK-UNKNOWN: 0583efa0 <unknown>169