| 1 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %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=+sme < %s \ |
| 6 |
// RUN: | llvm-objdump -d --mattr=+sme - | FileCheck %s --check-prefix=CHECK-INST |
| 7 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \ |
| 8 |
// RUN: | llvm-objdump -d --mattr=-sme - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 9 |
// Disassemble encoding and check the re-encoding (-show-encoding) matches. |
| 10 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \ |
| 11 |
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ |
| 12 |
// RUN: | llvm-mc -triple=aarch64 -mattr=+sme -disassemble -show-encoding \ |
| 13 |
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 14 |
|
| 15 |
// --------------------------------------------------------------------------// |
| 16 |
// 8-bit |
| 17 |
|
| 18 |
sclamp z0.b, z0.b, z0.b |
| 19 |
// CHECK-INST: sclamp z0.b, z0.b, z0.b |
| 20 |
// CHECK-ENCODING: [0x00,0xc0,0x00,0x44] |
| 21 |
// CHECK-ERROR: instruction requires: sme |
| 22 |
// CHECK-UNKNOWN: 4400c000 <unknown> |
| 23 |
|
| 24 |
sclamp z21.b, z10.b, z21.b |
| 25 |
// CHECK-INST: sclamp z21.b, z10.b, z21.b |
| 26 |
// CHECK-ENCODING: [0x55,0xc1,0x15,0x44] |
| 27 |
// CHECK-ERROR: instruction requires: sme |
| 28 |
// CHECK-UNKNOWN: 4415c155 <unknown> |
| 29 |
|
| 30 |
sclamp z23.b, z13.b, z8.b |
| 31 |
// CHECK-INST: sclamp z23.b, z13.b, z8.b |
| 32 |
// CHECK-ENCODING: [0xb7,0xc1,0x08,0x44] |
| 33 |
// CHECK-ERROR: instruction requires: sme |
| 34 |
// CHECK-UNKNOWN: 4408c1b7 <unknown> |
| 35 |
|
| 36 |
sclamp z31.b, z31.b, z31.b |
| 37 |
// CHECK-INST: sclamp z31.b, z31.b, z31.b |
| 38 |
// CHECK-ENCODING: [0xff,0xc3,0x1f,0x44] |
| 39 |
// CHECK-ERROR: instruction requires: sme |
| 40 |
// CHECK-UNKNOWN: 441fc3ff <unknown> |
| 41 |
|
| 42 |
// --------------------------------------------------------------------------// |
| 43 |
// 16-bit |
| 44 |
|
| 45 |
sclamp z0.h, z0.h, z0.h |
| 46 |
// CHECK-INST: sclamp z0.h, z0.h, z0.h |
| 47 |
// CHECK-ENCODING: [0x00,0xc0,0x40,0x44] |
| 48 |
// CHECK-ERROR: instruction requires: sme |
| 49 |
// CHECK-UNKNOWN: 4440c000 <unknown> |
| 50 |
|
| 51 |
sclamp z21.h, z10.h, z21.h |
| 52 |
// CHECK-INST: sclamp z21.h, z10.h, z21.h |
| 53 |
// CHECK-ENCODING: [0x55,0xc1,0x55,0x44] |
| 54 |
// CHECK-ERROR: instruction requires: sme |
| 55 |
// CHECK-UNKNOWN: 4455c155 <unknown> |
| 56 |
|
| 57 |
sclamp z23.h, z13.h, z8.h |
| 58 |
// CHECK-INST: sclamp z23.h, z13.h, z8.h |
| 59 |
// CHECK-ENCODING: [0xb7,0xc1,0x48,0x44] |
| 60 |
// CHECK-ERROR: instruction requires: sme |
| 61 |
// CHECK-UNKNOWN: 4448c1b7 <unknown> |
| 62 |
|
| 63 |
sclamp z31.h, z31.h, z31.h |
| 64 |
// CHECK-INST: sclamp z31.h, z31.h, z31.h |
| 65 |
// CHECK-ENCODING: [0xff,0xc3,0x5f,0x44] |
| 66 |
// CHECK-ERROR: instruction requires: sme |
| 67 |
// CHECK-UNKNOWN: 445fc3ff <unknown> |
| 68 |
|
| 69 |
// --------------------------------------------------------------------------// |
| 70 |
// 32-bit |
| 71 |
|
| 72 |
sclamp z0.s, z0.s, z0.s |
| 73 |
// CHECK-INST: sclamp z0.s, z0.s, z0.s |
| 74 |
// CHECK-ENCODING: [0x00,0xc0,0x80,0x44] |
| 75 |
// CHECK-ERROR: instruction requires: sme |
| 76 |
// CHECK-UNKNOWN: 4480c000 <unknown> |
| 77 |
|
| 78 |
sclamp z21.s, z10.s, z21.s |
| 79 |
// CHECK-INST: sclamp z21.s, z10.s, z21.s |
| 80 |
// CHECK-ENCODING: [0x55,0xc1,0x95,0x44] |
| 81 |
// CHECK-ERROR: instruction requires: sme |
| 82 |
// CHECK-UNKNOWN: 4495c155 <unknown> |
| 83 |
|
| 84 |
sclamp z23.s, z13.s, z8.s |
| 85 |
// CHECK-INST: sclamp z23.s, z13.s, z8.s |
| 86 |
// CHECK-ENCODING: [0xb7,0xc1,0x88,0x44] |
| 87 |
// CHECK-ERROR: instruction requires: sme |
| 88 |
// CHECK-UNKNOWN: 4488c1b7 <unknown> |
| 89 |
|
| 90 |
sclamp z31.s, z31.s, z31.s |
| 91 |
// CHECK-INST: sclamp z31.s, z31.s, z31.s |
| 92 |
// CHECK-ENCODING: [0xff,0xc3,0x9f,0x44] |
| 93 |
// CHECK-ERROR: instruction requires: sme |
| 94 |
// CHECK-UNKNOWN: 449fc3ff <unknown> |
| 95 |
|
| 96 |
// --------------------------------------------------------------------------// |
| 97 |
// 64-bit |
| 98 |
|
| 99 |
sclamp z0.d, z0.d, z0.d |
| 100 |
// CHECK-INST: sclamp z0.d, z0.d, z0.d |
| 101 |
// CHECK-ENCODING: [0x00,0xc0,0xc0,0x44] |
| 102 |
// CHECK-ERROR: instruction requires: sme |
| 103 |
// CHECK-UNKNOWN: 44c0c000 <unknown> |
| 104 |
|
| 105 |
sclamp z21.d, z10.d, z21.d |
| 106 |
// CHECK-INST: sclamp z21.d, z10.d, z21.d |
| 107 |
// CHECK-ENCODING: [0x55,0xc1,0xd5,0x44] |
| 108 |
// CHECK-ERROR: instruction requires: sme |
| 109 |
// CHECK-UNKNOWN: 44d5c155 <unknown> |
| 110 |
|
| 111 |
sclamp z23.d, z13.d, z8.d |
| 112 |
// CHECK-INST: sclamp z23.d, z13.d, z8.d |
| 113 |
// CHECK-ENCODING: [0xb7,0xc1,0xc8,0x44] |
| 114 |
// CHECK-ERROR: instruction requires: sme |
| 115 |
// CHECK-UNKNOWN: 44c8c1b7 <unknown> |
| 116 |
|
| 117 |
sclamp z31.d, z31.d, z31.d |
| 118 |
// CHECK-INST: sclamp z31.d, z31.d, z31.d |
| 119 |
// CHECK-ENCODING: [0xff,0xc3,0xdf,0x44] |
| 120 |
// CHECK-ERROR: instruction requires: sme |
| 121 |
// CHECK-UNKNOWN: 44dfc3ff <unknown> |
| 122 |
|
| 123 |
// --------------------------------------------------------------------------// |
| 124 |
// Test compatibility with MOVPRFX instruction. |
| 125 |
|
| 126 |
movprfx z23, z27 |
| 127 |
// CHECK-INST: movprfx z23, z27 |
| 128 |
// CHECK-ENCODING: [0x77,0xbf,0x20,0x04] |
| 129 |
// CHECK-ERROR: instruction requires: sve or sme |
| 130 |
// CHECK-UNKNOWN: 0420bf77 <unknown> |
| 131 |
|
| 132 |
sclamp z23.b, z13.b, z8.b |
| 133 |
// CHECK-INST: sclamp z23.b, z13.b, z8.b |
| 134 |
// CHECK-ENCODING: [0xb7,0xc1,0x08,0x44] |
| 135 |
// CHECK-ERROR: instruction requires: sme |
| 136 |
// CHECK-UNKNOWN: 4408c1b7 <unknown> |
| 137 |
|
| 138 |
movprfx z23, z27 |
| 139 |
// CHECK-INST: movprfx z23, z27 |
| 140 |
// CHECK-ENCODING: [0x77,0xbf,0x20,0x04] |
| 141 |
// CHECK-ERROR: instruction requires: sve or sme |
| 142 |
// CHECK-UNKNOWN: 0420bf77 <unknown> |
| 143 |
|
| 144 |
sclamp z23.h, z13.h, z8.h |
| 145 |
// CHECK-INST: sclamp z23.h, z13.h, z8.h |
| 146 |
// CHECK-ENCODING: [0xb7,0xc1,0x48,0x44] |
| 147 |
// CHECK-ERROR: instruction requires: sme |
| 148 |
// CHECK-UNKNOWN: 4448c1b7 <unknown> |
| 149 |
|
| 150 |
movprfx z23, z27 |
| 151 |
// CHECK-INST: movprfx z23, z27 |
| 152 |
// CHECK-ENCODING: [0x77,0xbf,0x20,0x04] |
| 153 |
// CHECK-ERROR: instruction requires: sve or sme |
| 154 |
// CHECK-UNKNOWN: 0420bf77 <unknown> |
| 155 |
|
| 156 |
sclamp z23.s, z13.s, z8.s |
| 157 |
// CHECK-INST: sclamp z23.s, z13.s, z8.s |
| 158 |
// CHECK-ENCODING: [0xb7,0xc1,0x88,0x44] |
| 159 |
// CHECK-ERROR: instruction requires: sme |
| 160 |
// CHECK-UNKNOWN: 4488c1b7 <unknown> |
| 161 |
|
| 162 |
movprfx z23, z27 |
| 163 |
// CHECK-INST: movprfx z23, z27 |
| 164 |
// CHECK-ENCODING: [0x77,0xbf,0x20,0x04] |
| 165 |
// CHECK-ERROR: instruction requires: sve or sme |
| 166 |
// CHECK-UNKNOWN: 0420bf77 <unknown> |
| 167 |
|
| 168 |
sclamp z23.d, z13.d, z8.d |
| 169 |
// CHECK-INST: sclamp z23.d, z13.d, z8.d |
| 170 |
// CHECK-ENCODING: [0xb7,0xc1,0xc8,0x44] |
| 171 |
// CHECK-ERROR: instruction requires: sme |
| 172 |
// CHECK-UNKNOWN: 44c8c1b7 <unknown> |