Debian Codegraph @

llvm/test/MC/AArch64/FP8/mla.s

raw
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+fp8fma < %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=+fp8fma < %s \
6 // RUN: | llvm-objdump -d --mattr=+fp8fma - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+fp8fma < %s \
8 // RUN: | llvm-objdump -d --mattr=-fp8fma - | 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=+fp8fma < %s \
11 // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
12 // RUN: | llvm-mc -triple=aarch64 -mattr=+fp8fma -disassemble -show-encoding \
13 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
14
15 /// VECTOR
16 // MLA
17 fmlalb v0.8h, v0.16b, v0.16b
18 // CHECK-INST: fmlalb v0.8h, v0.16b, v0.16b
19 // CHECK-ENCODING: [0x00,0xfc,0xc0,0x0e]
20 // CHECK-ERROR: instruction requires: fp8fma
21 // CHECK-UNKNOWN: 0ec0fc00 <unknown>
22
23 fmlalt v31.8h, v31.16b, v31.16b
24 // CHECK-INST: fmlalt v31.8h, v31.16b, v31.16b
25 // CHECK-ENCODING: [0xff,0xff,0xdf,0x4e]
26 // CHECK-ERROR: instruction requires: fp8fma
27 // CHECK-UNKNOWN: 4edfffff <unknown>
28
29
30 // MLALL
31 fmlallbb v0.4s, v0.16b, v31.16b
32 // CHECK-INST: fmlallbb v0.4s, v0.16b, v31.16b
33 // CHECK-ENCODING: [0x00,0xc4,0x1f,0x0e]
34 // CHECK-ERROR: instruction requires: fp8fma
35 // CHECK-UNKNOWN: 0e1fc400 <unknown>
36
37 fmlallbt v31.4s, v31.16b, v0.16b
38 // CHECK-INST: fmlallbt v31.4s, v31.16b, v0.16b
39 // CHECK-ENCODING: [0xff,0xc7,0x40,0x0e]
40 // CHECK-ERROR: instruction requires: fp8fma
41 // CHECK-UNKNOWN: 0e40c7ff <unknown>
42
43 fmlalltb v31.4s, v31.16b, v0.16b
44 // CHECK-INST: fmlalltb v31.4s, v31.16b, v0.16b
45 // CHECK-ENCODING: [0xff,0xc7,0x00,0x4e]
46 // CHECK-ERROR: instruction requires: fp8fma
47 // CHECK-UNKNOWN: 4e00c7ff <unknown>
48
49 fmlalltt v0.4s, v0.16b, v31.16b
50 // CHECK-INST: fmlalltt v0.4s, v0.16b, v31.16b
51 // CHECK-ENCODING: [0x00,0xc4,0x5f,0x4e]
52 // CHECK-ERROR: instruction requires: fp8fma
53 // CHECK-UNKNOWN: 4e5fc400 <unknown>
54
55 fmlalltt v31.4s, v31.16b, v31.16b // 01001110-01011111-11000111-11111111
56 // CHECK-INST: fmlalltt v31.4s, v31.16b, v31.16b
57 // CHECK-ENCODING: [0xff,0xc7,0x5f,0x4e]
58 // CHECK-ERROR: instruction requires: fp8
59 // CHECK-UNKNOWN: 4e5fc7ff <unknown>
60
61 //INDEXED
62 // MLA
63 fmlalb v31.8h, v0.16b, v0.b[0]
64 // CHECK-INST: fmlalb v31.8h, v0.16b, v0.b[0]
65 // CHECK-ENCODING: [0x1f,0x00,0xc0,0x0f]
66 // CHECK-ERROR: instruction requires: fp8fma
67 // CHECK-UNKNOWN: 0fc0001f <unknown>
68
69 fmlalt v31.8h, v0.16b, v0.b[15]
70 // CHECK-INST: fmlalt v31.8h, v0.16b, v0.b[15]
71 // CHECK-ENCODING: [0x1f,0x08,0xf8,0x4f]
72 // CHECK-ERROR: instruction requires: fp8fma
73 // CHECK-UNKNOWN: 4ff8081f <unknown>
74
75 // MLALL
76 fmlallbb v31.4s, v0.16b, v7.b[0]
77 // CHECK-INST: fmlallbb v31.4s, v0.16b, v7.b[0]
78 // CHECK-ENCODING: [0x1f,0x80,0x07,0x2f]
79 // CHECK-ERROR: instruction requires: fp8fma
80 // CHECK-UNKNOWN: 2f07801f <unknown>
81
82 fmlalltt v31.4s, v0.16b, v7.b[0]
83 // CHECK-INST: fmlalltt v31.4s, v0.16b, v7.b[0]
84 // CHECK-ENCODING: [0x1f,0x80,0x47,0x6f]
85 // CHECK-ERROR: instruction requires: fp8fma
86 // CHECK-UNKNOWN: 6f47801f <unknown>
87
88 fmlalltb v0.4s, v31.16b, v7.b[15]
89 // CHECK-INST: fmlalltb v0.4s, v31.16b, v7.b[15]
90 // CHECK-ENCODING: [0xe0,0x8b,0x3f,0x6f]
91 // CHECK-ERROR: instruction requires: fp8fma
92 // CHECK-UNKNOWN: 6f3f8be0 <unknown>
93
94 fmlallbt v0.4s, v31.16b, v0.b[15]
95 // CHECK-INST: fmlallbt v0.4s, v31.16b, v0.b[15]
96 // CHECK-ENCODING: [0xe0,0x8b,0x78,0x2f]
97 // CHECK-ERROR: instruction requires: fp8fma
98 // CHECK-UNKNOWN: 2f788be0 <unknown>