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 10mul z0.b, p7/m, z0.b, z31.b 11// CHECK-INST: mul z0.b, p7/m, z0.b, z31.b 12// CHECK-ENCODING: [0xe0,0x1f,0x10,0x04] 13// CHECK-ERROR: instruction requires: sve 14// CHECK-UNKNOWN: e0 1f 10 04 <unknown> 15 16mul z0.h, p7/m, z0.h, z31.h 17// CHECK-INST: mul z0.h, p7/m, z0.h, z31.h 18// CHECK-ENCODING: [0xe0,0x1f,0x50,0x04] 19// CHECK-ERROR: instruction requires: sve 20// CHECK-UNKNOWN: e0 1f 50 04 <unknown> 21 22mul z0.s, p7/m, z0.s, z31.s 23// CHECK-INST: mul z0.s, p7/m, z0.s, z31.s 24// CHECK-ENCODING: [0xe0,0x1f,0x90,0x04] 25// CHECK-ERROR: instruction requires: sve 26// CHECK-UNKNOWN: e0 1f 90 04 <unknown> 27 28mul z0.d, p7/m, z0.d, z31.d 29// CHECK-INST: mul z0.d, p7/m, z0.d, z31.d 30// CHECK-ENCODING: [0xe0,0x1f,0xd0,0x04] 31// CHECK-ERROR: instruction requires: sve 32// CHECK-UNKNOWN: e0 1f d0 04 <unknown> 33 34mul z31.b, z31.b, #-128 35// CHECK-INST: mul z31.b, z31.b, #-128 36// CHECK-ENCODING: [0x1f,0xd0,0x30,0x25] 37// CHECK-ERROR: instruction requires: sve 38// CHECK-UNKNOWN: 1f d0 30 25 <unknown> 39 40mul z31.b, z31.b, #127 41// CHECK-INST: mul z31.b, z31.b, #127 42// CHECK-ENCODING: [0xff,0xcf,0x30,0x25] 43// CHECK-ERROR: instruction requires: sve 44// CHECK-UNKNOWN: ff cf 30 25 <unknown> 45 46mul z31.h, z31.h, #-128 47// CHECK-INST: mul z31.h, z31.h, #-128 48// CHECK-ENCODING: [0x1f,0xd0,0x70,0x25] 49// CHECK-ERROR: instruction requires: sve 50// CHECK-UNKNOWN: 1f d0 70 25 <unknown> 51 52mul z31.h, z31.h, #127 53// CHECK-INST: mul z31.h, z31.h, #127 54// CHECK-ENCODING: [0xff,0xcf,0x70,0x25] 55// CHECK-ERROR: instruction requires: sve 56// CHECK-UNKNOWN: ff cf 70 25 <unknown> 57 58mul z31.s, z31.s, #-128 59// CHECK-INST: mul z31.s, z31.s, #-128 60// CHECK-ENCODING: [0x1f,0xd0,0xb0,0x25] 61// CHECK-ERROR: instruction requires: sve 62// CHECK-UNKNOWN: 1f d0 b0 25 <unknown> 63 64mul z31.s, z31.s, #127 65// CHECK-INST: mul z31.s, z31.s, #127 66// CHECK-ENCODING: [0xff,0xcf,0xb0,0x25] 67// CHECK-ERROR: instruction requires: sve 68// CHECK-UNKNOWN: ff cf b0 25 <unknown> 69 70mul z31.d, z31.d, #-128 71// CHECK-INST: mul z31.d, z31.d, #-128 72// CHECK-ENCODING: [0x1f,0xd0,0xf0,0x25] 73// CHECK-ERROR: instruction requires: sve 74// CHECK-UNKNOWN: 1f d0 f0 25 <unknown> 75 76mul z31.d, z31.d, #127 77// CHECK-INST: mul z31.d, z31.d, #127 78// CHECK-ENCODING: [0xff,0xcf,0xf0,0x25] 79// CHECK-ERROR: instruction requires: sve 80// CHECK-UNKNOWN: ff cf f0 25 <unknown> 81 82 83// --------------------------------------------------------------------------// 84// Test compatibility with MOVPRFX instruction. 85 86movprfx z0.d, p7/z, z7.d 87// CHECK-INST: movprfx z0.d, p7/z, z7.d 88// CHECK-ENCODING: [0xe0,0x3c,0xd0,0x04] 89// CHECK-ERROR: instruction requires: sve 90// CHECK-UNKNOWN: e0 3c d0 04 <unknown> 91 92mul z0.d, p7/m, z0.d, z31.d 93// CHECK-INST: mul z0.d, p7/m, z0.d, z31.d 94// CHECK-ENCODING: [0xe0,0x1f,0xd0,0x04] 95// CHECK-ERROR: instruction requires: sve 96// CHECK-UNKNOWN: e0 1f d0 04 <unknown> 97 98movprfx z0, z7 99// CHECK-INST: movprfx z0, z7 100// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 101// CHECK-ERROR: instruction requires: sve 102// CHECK-UNKNOWN: e0 bc 20 04 <unknown> 103 104mul z0.d, p7/m, z0.d, z31.d 105// CHECK-INST: mul z0.d, p7/m, z0.d, z31.d 106// CHECK-ENCODING: [0xe0,0x1f,0xd0,0x04] 107// CHECK-ERROR: instruction requires: sve 108// CHECK-UNKNOWN: e0 1f d0 04 <unknown> 109 110movprfx z31, z6 111// CHECK-INST: movprfx z31, z6 112// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04] 113// CHECK-ERROR: instruction requires: sve 114// CHECK-UNKNOWN: df bc 20 04 <unknown> 115 116mul z31.d, z31.d, #127 117// CHECK-INST: mul z31.d, z31.d, #127 118// CHECK-ENCODING: [0xff,0xcf,0xf0,0x25] 119// CHECK-ERROR: instruction requires: sve 120// CHECK-UNKNOWN: ff cf f0 25 <unknown> 121