1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ 2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ 4// RUN: | FileCheck %s --check-prefix=CHECK-ERROR 5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ 6// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST 7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ 8// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN 9 10bic z5.b, z5.b, #0xf9 11// CHECK-INST: and z5.b, z5.b, #0x6 12// CHECK-ENCODING: [0x25,0x3e,0x80,0x05] 13// CHECK-ERROR: instruction requires: sve 14// CHECK-UNKNOWN: 25 3e 80 05 <unknown> 15 16bic z23.h, z23.h, #0xfff9 17// CHECK-INST: and z23.h, z23.h, #0x6 18// CHECK-ENCODING: [0x37,0x7c,0x80,0x05] 19// CHECK-ERROR: instruction requires: sve 20// CHECK-UNKNOWN: 37 7c 80 05 <unknown> 21 22bic z0.s, z0.s, #0xfffffff9 23// CHECK-INST: and z0.s, z0.s, #0x6 24// CHECK-ENCODING: [0x20,0xf8,0x80,0x05] 25// CHECK-ERROR: instruction requires: sve 26// CHECK-UNKNOWN: 20 f8 80 05 <unknown> 27 28bic z0.d, z0.d, #0xfffffffffffffff9 29// CHECK-INST: and z0.d, z0.d, #0x6 30// CHECK-ENCODING: [0x20,0xf8,0x83,0x05] 31// CHECK-ERROR: instruction requires: sve 32// CHECK-UNKNOWN: 20 f8 83 05 <unknown> 33 34bic z5.b, z5.b, #0x6 35// CHECK-INST: and z5.b, z5.b, #0xf9 36// CHECK-ENCODING: [0xa5,0x2e,0x80,0x05] 37// CHECK-ERROR: instruction requires: sve 38// CHECK-UNKNOWN: a5 2e 80 05 <unknown> 39 40bic z23.h, z23.h, #0x6 41// CHECK-INST: and z23.h, z23.h, #0xfff9 42// CHECK-ENCODING: [0xb7,0x6d,0x80,0x05] 43// CHECK-ERROR: instruction requires: sve 44// CHECK-UNKNOWN: b7 6d 80 05 <unknown> 45 46bic z0.s, z0.s, #0x6 47// CHECK-INST: and z0.s, z0.s, #0xfffffff9 48// CHECK-ENCODING: [0xa0,0xeb,0x80,0x05] 49// CHECK-ERROR: instruction requires: sve 50// CHECK-UNKNOWN: a0 eb 80 05 <unknown> 51 52bic z0.d, z0.d, #0x6 53// CHECK-INST: and z0.d, z0.d, #0xfffffffffffffff9 54// CHECK-ENCODING: [0xa0,0xef,0x83,0x05] 55// CHECK-ERROR: instruction requires: sve 56// CHECK-UNKNOWN: a0 ef 83 05 <unknown> 57 58bic z0.d, z0.d, z0.d 59// CHECK-INST: bic z0.d, z0.d, z0.d 60// CHECK-ENCODING: [0x00,0x30,0xe0,0x04] 61// CHECK-ERROR: instruction requires: sve 62// CHECK-UNKNOWN: 00 30 e0 04 <unknown> 63 64bic z23.d, z13.d, z8.d 65// CHECK-INST: bic z23.d, z13.d, z8.d 66// CHECK-ENCODING: [0xb7,0x31,0xe8,0x04] 67// CHECK-ERROR: instruction requires: sve 68// CHECK-UNKNOWN: b7 31 e8 04 <unknown> 69 70bic z31.b, p7/m, z31.b, z31.b 71// CHECK-INST: bic z31.b, p7/m, z31.b, z31.b 72// CHECK-ENCODING: [0xff,0x1f,0x1b,0x04] 73// CHECK-ERROR: instruction requires: sve 74// CHECK-UNKNOWN: ff 1f 1b 04 <unknown> 75 76bic z31.h, p7/m, z31.h, z31.h 77// CHECK-INST: bic z31.h, p7/m, z31.h, z31.h 78// CHECK-ENCODING: [0xff,0x1f,0x5b,0x04] 79// CHECK-ERROR: instruction requires: sve 80// CHECK-UNKNOWN: ff 1f 5b 04 <unknown> 81 82bic z31.s, p7/m, z31.s, z31.s 83// CHECK-INST: bic z31.s, p7/m, z31.s, z31.s 84// CHECK-ENCODING: [0xff,0x1f,0x9b,0x04] 85// CHECK-ERROR: instruction requires: sve 86// CHECK-UNKNOWN: ff 1f 9b 04 <unknown> 87 88bic z31.d, p7/m, z31.d, z31.d 89// CHECK-INST: bic z31.d, p7/m, z31.d, z31.d 90// CHECK-ENCODING: [0xff,0x1f,0xdb,0x04] 91// CHECK-ERROR: instruction requires: sve 92// CHECK-UNKNOWN: ff 1f db 04 <unknown> 93 94bic p15.b, p15/z, p15.b, p15.b 95// CHECK-INST: bic p15.b, p15/z, p15.b, p15.b 96// CHECK-ENCODING: [0xff,0x7d,0x0f,0x25] 97// CHECK-ERROR: instruction requires: sve 98// CHECK-UNKNOWN: ff 7d 0f 25 <unknown> 99 100bic p0.b, p0/z, p0.b, p0.b 101// CHECK-INST: bic p0.b, p0/z, p0.b, p0.b 102// CHECK-ENCODING: [0x10,0x40,0x00,0x25] 103// CHECK-ERROR: instruction requires: sve 104// CHECK-UNKNOWN: 10 40 00 25 <unknown> 105 106 107// --------------------------------------------------------------------------// 108// Test compatibility with MOVPRFX instruction. 109 110movprfx z4.d, p7/z, z6.d 111// CHECK-INST: movprfx z4.d, p7/z, z6.d 112// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04] 113// CHECK-ERROR: instruction requires: sve 114// CHECK-UNKNOWN: c4 3c d0 04 <unknown> 115 116bic z4.d, p7/m, z4.d, z31.d 117// CHECK-INST: bic z4.d, p7/m, z4.d, z31.d 118// CHECK-ENCODING: [0xe4,0x1f,0xdb,0x04] 119// CHECK-ERROR: instruction requires: sve 120// CHECK-UNKNOWN: e4 1f db 04 <unknown> 121 122movprfx z4, z6 123// CHECK-INST: movprfx z4, z6 124// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04] 125// CHECK-ERROR: instruction requires: sve 126// CHECK-UNKNOWN: c4 bc 20 04 <unknown> 127 128bic z4.d, p7/m, z4.d, z31.d 129// CHECK-INST: bic z4.d, p7/m, z4.d, z31.d 130// CHECK-ENCODING: [0xe4,0x1f,0xdb,0x04] 131// CHECK-ERROR: instruction requires: sve 132// CHECK-UNKNOWN: e4 1f db 04 <unknown> 133 134movprfx z0, z7 135// CHECK-INST: movprfx z0, z7 136// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 137// CHECK-ERROR: instruction requires: sve 138// CHECK-UNKNOWN: e0 bc 20 04 <unknown> 139 140bic z0.d, z0.d, #0x6 141// CHECK-INST: and z0.d, z0.d, #0xfffffffffffffff9 142// CHECK-ENCODING: [0xa0,0xef,0x83,0x05] 143// CHECK-ERROR: instruction requires: sve 144// CHECK-UNKNOWN: a0 ef 83 05 <unknown> 145