| 1 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+ssve-fp8fma < %s \ |
| 2 |
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 3 |
|
| 4 |
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ |
| 5 |
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR |
| 6 |
|
| 7 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8fma < %s \ |
| 8 |
// RUN: | llvm-objdump -d --mattr=+sve2,+fp8fma --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST |
| 9 |
|
| 10 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2,+fp8fma < %s \ |
| 11 |
// RUN: | llvm-objdump -d --mattr=-fp8fma --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 12 |
|
| 13 |
// Disassemble encoding and check the re-encoding (-show-encoding) matches. |
| 14 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2,+fp8fma < %s \ |
| 15 |
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ |
| 16 |
// RUN: | llvm-mc -triple=aarch64 -mattr=+sve2,+fp8fma -disassemble -show-encoding \ |
| 17 |
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 18 |
|
| 19 |
// |
| 20 |
// FMLALB instructions |
| 21 |
// |
| 22 |
// fmlalb - indexed |
| 23 |
|
| 24 |
fmlalb z0.h, z0.b, z0.b[0] // 01100100-00100000-01010000-00000000 |
| 25 |
// CHECK-INST: fmlalb z0.h, z0.b, z0.b[0] |
| 26 |
// CHECK-ENCODING: [0x00,0x50,0x20,0x64] |
| 27 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 28 |
// CHECK-UNKNOWN: 64205000 <unknown> |
| 29 |
|
| 30 |
movprfx z23, z31 |
| 31 |
fmlalb z23.h, z13.b, z0.b[7] // 01100100-00101000-01011101-10110111 |
| 32 |
// CHECK-INST: movprfx z23, z31 |
| 33 |
// CHECK-INST: fmlalb z23.h, z13.b, z0.b[7] |
| 34 |
// CHECK-ENCODING: [0xb7,0x5d,0x28,0x64] |
| 35 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 36 |
// CHECK-UNKNOWN: 64285db7 <unknown> |
| 37 |
|
| 38 |
fmlalb z31.h, z31.b, z7.b[15] // 01100100-00111111-01011111-11111111 |
| 39 |
// CHECK-INST: fmlalb z31.h, z31.b, z7.b[15] |
| 40 |
// CHECK-ENCODING: [0xff,0x5f,0x3f,0x64] |
| 41 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 42 |
// CHECK-UNKNOWN: 643f5fff <unknown> |
| 43 |
|
| 44 |
|
| 45 |
// fmlalb - group |
| 46 |
|
| 47 |
fmlalb z0.h, z0.b, z0.b // 01100100-10100000-10001000-00000000 |
| 48 |
// CHECK-INST: fmlalb z0.h, z0.b, z0.b |
| 49 |
// CHECK-ENCODING: [0x00,0x88,0xa0,0x64] |
| 50 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 51 |
// CHECK-UNKNOWN: 64a08800 <unknown> |
| 52 |
|
| 53 |
movprfx z23, z31 |
| 54 |
fmlalb z23.h, z13.b, z8.b // 01100100-10101000-10001001-10110111 |
| 55 |
// CHECK-INST: movprfx z23, z31 |
| 56 |
// CHECK-INST: fmlalb z23.h, z13.b, z8.b |
| 57 |
// CHECK-ENCODING: [0xb7,0x89,0xa8,0x64] |
| 58 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 59 |
// CHECK-UNKNOWN: 64a889b7 <unknown> |
| 60 |
|
| 61 |
fmlalb z31.h, z31.b, z31.b // 01100100-10111111-10001011-11111111 |
| 62 |
// CHECK-INST: fmlalb z31.h, z31.b, z31.b |
| 63 |
// CHECK-ENCODING: [0xff,0x8b,0xbf,0x64] |
| 64 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 65 |
// CHECK-UNKNOWN: 64bf8bff <unknown> |
| 66 |
|
| 67 |
|
| 68 |
// |
| 69 |
// FMLALT instructions |
| 70 |
// |
| 71 |
// fmlalt - indexed |
| 72 |
|
| 73 |
fmlalt z0.h, z0.b, z0.b[0] // 01100100-10100000-01010000-00000000 |
| 74 |
// CHECK-INST: fmlalt z0.h, z0.b, z0.b[0] |
| 75 |
// CHECK-ENCODING: [0x00,0x50,0xa0,0x64] |
| 76 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 77 |
// CHECK-UNKNOWN: 64a05000 <unknown> |
| 78 |
|
| 79 |
movprfx z23, z31 |
| 80 |
fmlalt z23.h, z13.b, z0.b[7] // 01100100-10101000-01011101-10110111 |
| 81 |
// CHECK-INST: movprfx z23, z31 |
| 82 |
// CHECK-INST: fmlalt z23.h, z13.b, z0.b[7] |
| 83 |
// CHECK-ENCODING: [0xb7,0x5d,0xa8,0x64] |
| 84 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 85 |
// CHECK-UNKNOWN: 64a85db7 <unknown> |
| 86 |
|
| 87 |
fmlalt z31.h, z31.b, z7.b[15] // 01100100-10111111-01011111-11111111 |
| 88 |
// CHECK-INST: fmlalt z31.h, z31.b, z7.b[15] |
| 89 |
// CHECK-ENCODING: [0xff,0x5f,0xbf,0x64] |
| 90 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 91 |
// CHECK-UNKNOWN: 64bf5fff <unknown> |
| 92 |
|
| 93 |
|
| 94 |
// fmlalt - group |
| 95 |
|
| 96 |
fmlalt z0.h, z0.b, z0.b // 01100100-10100000-10011000-00000000 |
| 97 |
// CHECK-INST: fmlalt z0.h, z0.b, z0.b |
| 98 |
// CHECK-ENCODING: [0x00,0x98,0xa0,0x64] |
| 99 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 100 |
// CHECK-UNKNOWN: 64a09800 <unknown> |
| 101 |
|
| 102 |
movprfx z23, z31 |
| 103 |
fmlalt z23.h, z13.b, z8.b // 01100100-10101000-10011001-10110111 |
| 104 |
// CHECK-INST: movprfx z23, z31 |
| 105 |
// CHECK-INST: fmlalt z23.h, z13.b, z8.b |
| 106 |
// CHECK-ENCODING: [0xb7,0x99,0xa8,0x64] |
| 107 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 108 |
// CHECK-UNKNOWN: 64a899b7 <unknown> |
| 109 |
|
| 110 |
fmlalt z31.h, z31.b, z31.b // 01100100-10111111-10011011-11111111 |
| 111 |
// CHECK-INST: fmlalt z31.h, z31.b, z31.b |
| 112 |
// CHECK-ENCODING: [0xff,0x9b,0xbf,0x64] |
| 113 |
// CHECK-ERROR: instruction requires: ssve-fp8fma or (sve2 and fp8fma) |
| 114 |
// CHECK-UNKNOWN: 64bf9bff <unknown> |