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 10st1b z0.b, p0, [x0] 11// CHECK-INST: st1b { z0.b }, p0, [x0] 12// CHECK-ENCODING: [0x00,0xe0,0x00,0xe4] 13// CHECK-ERROR: instruction requires: sve 14// CHECK-UNKNOWN: 00 e0 00 e4 <unknown> 15 16st1b z0.h, p0, [x0] 17// CHECK-INST: st1b { z0.h }, p0, [x0] 18// CHECK-ENCODING: [0x00,0xe0,0x20,0xe4] 19// CHECK-ERROR: instruction requires: sve 20// CHECK-UNKNOWN: 00 e0 20 e4 <unknown> 21 22st1b z0.s, p0, [x0] 23// CHECK-INST: st1b { z0.s }, p0, [x0] 24// CHECK-ENCODING: [0x00,0xe0,0x40,0xe4] 25// CHECK-ERROR: instruction requires: sve 26// CHECK-UNKNOWN: 00 e0 40 e4 <unknown> 27 28st1b z0.d, p0, [x0] 29// CHECK-INST: st1b { z0.d }, p0, [x0] 30// CHECK-ENCODING: [0x00,0xe0,0x60,0xe4] 31// CHECK-ERROR: instruction requires: sve 32// CHECK-UNKNOWN: 00 e0 60 e4 <unknown> 33 34st1b { z0.b }, p0, [x0] 35// CHECK-INST: st1b { z0.b }, p0, [x0] 36// CHECK-ENCODING: [0x00,0xe0,0x00,0xe4] 37// CHECK-ERROR: instruction requires: sve 38// CHECK-UNKNOWN: 00 e0 00 e4 <unknown> 39 40st1b { z0.h }, p0, [x0] 41// CHECK-INST: st1b { z0.h }, p0, [x0] 42// CHECK-ENCODING: [0x00,0xe0,0x20,0xe4] 43// CHECK-ERROR: instruction requires: sve 44// CHECK-UNKNOWN: 00 e0 20 e4 <unknown> 45 46st1b { z0.s }, p0, [x0] 47// CHECK-INST: st1b { z0.s }, p0, [x0] 48// CHECK-ENCODING: [0x00,0xe0,0x40,0xe4] 49// CHECK-ERROR: instruction requires: sve 50// CHECK-UNKNOWN: 00 e0 40 e4 <unknown> 51 52st1b { z0.d }, p0, [x0] 53// CHECK-INST: st1b { z0.d }, p0, [x0] 54// CHECK-ENCODING: [0x00,0xe0,0x60,0xe4] 55// CHECK-ERROR: instruction requires: sve 56// CHECK-UNKNOWN: 00 e0 60 e4 <unknown> 57 58st1b { z31.b }, p7, [sp, #-1, mul vl] 59// CHECK-INST: st1b { z31.b }, p7, [sp, #-1, mul vl] 60// CHECK-ENCODING: [0xff,0xff,0x0f,0xe4] 61// CHECK-ERROR: instruction requires: sve 62// CHECK-UNKNOWN: ff ff 0f e4 <unknown> 63 64st1b { z21.b }, p5, [x10, #5, mul vl] 65// CHECK-INST: st1b { z21.b }, p5, [x10, #5, mul vl] 66// CHECK-ENCODING: [0x55,0xf5,0x05,0xe4] 67// CHECK-ERROR: instruction requires: sve 68// CHECK-UNKNOWN: 55 f5 05 e4 <unknown> 69 70st1b { z31.h }, p7, [sp, #-1, mul vl] 71// CHECK-INST: st1b { z31.h }, p7, [sp, #-1, mul vl] 72// CHECK-ENCODING: [0xff,0xff,0x2f,0xe4] 73// CHECK-ERROR: instruction requires: sve 74// CHECK-UNKNOWN: ff ff 2f e4 <unknown> 75 76st1b { z21.h }, p5, [x10, #5, mul vl] 77// CHECK-INST: st1b { z21.h }, p5, [x10, #5, mul vl] 78// CHECK-ENCODING: [0x55,0xf5,0x25,0xe4] 79// CHECK-ERROR: instruction requires: sve 80// CHECK-UNKNOWN: 55 f5 25 e4 <unknown> 81 82st1b { z31.s }, p7, [sp, #-1, mul vl] 83// CHECK-INST: st1b { z31.s }, p7, [sp, #-1, mul vl] 84// CHECK-ENCODING: [0xff,0xff,0x4f,0xe4] 85// CHECK-ERROR: instruction requires: sve 86// CHECK-UNKNOWN: ff ff 4f e4 <unknown> 87 88st1b { z21.s }, p5, [x10, #5, mul vl] 89// CHECK-INST: st1b { z21.s }, p5, [x10, #5, mul vl] 90// CHECK-ENCODING: [0x55,0xf5,0x45,0xe4] 91// CHECK-ERROR: instruction requires: sve 92// CHECK-UNKNOWN: 55 f5 45 e4 <unknown> 93 94st1b { z31.d }, p7, [sp, #-1, mul vl] 95// CHECK-INST: st1b { z31.d }, p7, [sp, #-1, mul vl] 96// CHECK-ENCODING: [0xff,0xff,0x6f,0xe4] 97// CHECK-ERROR: instruction requires: sve 98// CHECK-UNKNOWN: ff ff 6f e4 <unknown> 99 100st1b { z21.d }, p5, [x10, #5, mul vl] 101// CHECK-INST: st1b { z21.d }, p5, [x10, #5, mul vl] 102// CHECK-ENCODING: [0x55,0xf5,0x65,0xe4] 103// CHECK-ERROR: instruction requires: sve 104// CHECK-UNKNOWN: 55 f5 65 e4 <unknown> 105 106st1b { z0.b }, p0, [x0, x0] 107// CHECK-INST: st1b { z0.b }, p0, [x0, x0] 108// CHECK-ENCODING: [0x00,0x40,0x00,0xe4] 109// CHECK-ERROR: instruction requires: sve 110// CHECK-UNKNOWN: 00 40 00 e4 <unknown> 111 112st1b { z0.h }, p0, [x0, x0] 113// CHECK-INST: st1b { z0.h }, p0, [x0, x0] 114// CHECK-ENCODING: [0x00,0x40,0x20,0xe4] 115// CHECK-ERROR: instruction requires: sve 116// CHECK-UNKNOWN: 00 40 20 e4 <unknown> 117 118st1b { z0.s }, p0, [x0, x0] 119// CHECK-INST: st1b { z0.s }, p0, [x0, x0] 120// CHECK-ENCODING: [0x00,0x40,0x40,0xe4] 121// CHECK-ERROR: instruction requires: sve 122// CHECK-UNKNOWN: 00 40 40 e4 <unknown> 123 124st1b { z0.d }, p0, [x0, x0] 125// CHECK-INST: st1b { z0.d }, p0, [x0, x0] 126// CHECK-ENCODING: [0x00,0x40,0x60,0xe4] 127// CHECK-ERROR: instruction requires: sve 128// CHECK-UNKNOWN: 00 40 60 e4 <unknown> 129 130st1b { z0.s }, p0, [x0, z0.s, uxtw] 131// CHECK-INST: st1b { z0.s }, p0, [x0, z0.s, uxtw] 132// CHECK-ENCODING: [0x00,0x80,0x40,0xe4] 133// CHECK-ERROR: instruction requires: sve 134// CHECK-UNKNOWN: 00 80 40 e4 <unknown> 135 136st1b { z0.s }, p0, [x0, z0.s, sxtw] 137// CHECK-INST: st1b { z0.s }, p0, [x0, z0.s, sxtw] 138// CHECK-ENCODING: [0x00,0xc0,0x40,0xe4] 139// CHECK-ERROR: instruction requires: sve 140// CHECK-UNKNOWN: 00 c0 40 e4 <unknown> 141 142st1b { z0.d }, p0, [x0, z0.d, uxtw] 143// CHECK-INST: st1b { z0.d }, p0, [x0, z0.d, uxtw] 144// CHECK-ENCODING: [0x00,0x80,0x00,0xe4] 145// CHECK-ERROR: instruction requires: sve 146// CHECK-UNKNOWN: 00 80 00 e4 <unknown> 147 148st1b { z0.d }, p0, [x0, z0.d, sxtw] 149// CHECK-INST: st1b { z0.d }, p0, [x0, z0.d, sxtw] 150// CHECK-ENCODING: [0x00,0xc0,0x00,0xe4] 151// CHECK-ERROR: instruction requires: sve 152// CHECK-UNKNOWN: 00 c0 00 e4 <unknown> 153 154st1b { z0.d }, p0, [x0, z0.d] 155// CHECK-INST: st1b { z0.d }, p0, [x0, z0.d] 156// CHECK-ENCODING: [0x00,0xa0,0x00,0xe4] 157// CHECK-ERROR: instruction requires: sve 158// CHECK-UNKNOWN: 00 a0 00 e4 <unknown> 159 160st1b { z31.s }, p7, [z31.s, #31] 161// CHECK-INST: st1b { z31.s }, p7, [z31.s, #31] 162// CHECK-ENCODING: [0xff,0xbf,0x7f,0xe4] 163// CHECK-ERROR: instruction requires: sve 164// CHECK-UNKNOWN: ff bf 7f e4 <unknown> 165 166st1b { z31.d }, p7, [z31.d, #31] 167// CHECK-INST: st1b { z31.d }, p7, [z31.d, #31] 168// CHECK-ENCODING: [0xff,0xbf,0x5f,0xe4] 169// CHECK-ERROR: instruction requires: sve 170// CHECK-UNKNOWN: ff bf 5f e4 <unknown> 171