xref: /llvm-project/llvm/test/MC/ARM/directive-arch_extension-crypto.s (revision 295cdd5c3dbd14406bf9cce01e3dfd787fb1ddda)
1@ RUN: not llvm-mc -triple armv7-eabi -filetype asm -o /dev/null 2>&1 %s \
2@ RUN:   | FileCheck %s -check-prefix CHECK-V7
3@ RUN: not llvm-mc -triple armv8-eabi -filetype asm -o /dev/null 2>&1 %s \
4@ RUN:   | FileCheck %s -check-prefix CHECK-V8
5@ RUN: not llvm-mc -triple thumbv7-eabi -filetype asm -o /dev/null 2>&1 %s \
6@ RUN:   | FileCheck %s -check-prefix CHECK-V7
7@ RUN: not llvm-mc -triple thumbv8-eabi -filetype asm -o /dev/null 2>&1 %s \
8@ RUN:   | FileCheck %s -check-prefix CHECK-V8
9
10	.syntax unified
11
12	.arch_extension crypto
13@ CHECK-V7: architectural extension 'crypto' is not allowed for the current base architecture
14@ CHECK-V7-NEXT: 	.arch_extension crypto
15@ CHECK-V7-NEXT:                     ^
16
17	.type crypto,%function
18crypto:
19	vmull.p64 q0, d0, d1
20@ CHECK-V7: error: invalid instruction, any one of the following would fix this:
21@ CHECK-V7: note: invalid operand for instruction
22@ CHECK-V7: note: instruction requires: aes armv8
23	aesd.8 q0, q1
24@ CHECK-V7: error: instruction requires: aes armv8
25	aese.8 q0, q1
26@ CHECK-V7: error: instruction requires: aes armv8
27	aesimc.8 q0, q1
28@ CHECK-V7: error: instruction requires: aes armv8
29	aesmc.8 q0, q1
30@ CHECK-V7: error: instruction requires: aes armv8
31
32	sha1h.32 q0, q1
33@ CHECK-V7: error: instruction requires: sha2 armv8
34	sha1su1.32 q0, q1
35@ CHECK-V7: error: instruction requires: sha2 armv8
36	sha256su0.32 q0, q1
37@ CHECK-V7: error: instruction requires: sha2 armv8
38
39	sha1c.32 q0, q1, q2
40@ CHECK-V7: error: instruction requires: sha2 armv8
41	sha1m.32 q0, q1, q2
42@ CHECK-V7: error: instruction requires: sha2 armv8
43	sha1p.32 q0, q1, q2
44@ CHECK-V7: error: instruction requires: sha2 armv8
45	sha1su0.32 q0, q1, q2
46@ CHECK-V7: error: instruction requires: sha2 armv8
47	sha256h.32 q0, q1, q2
48@ CHECK-V7: error: instruction requires: sha2 armv8
49	sha256h2.32 q0, q1, q2
50@ CHECK-V7: error: instruction requires: sha2 armv8
51	sha256su1.32 q0, q1, q2
52@ CHECK-V7: error: instruction requires: sha2 armv8
53
54	.arch_extension nocrypto
55@ CHECK-V7: error: architectural extension 'sha2' is not allowed for the current base architecture
56@ CHECK-V7: error: architectural extension 'aes' is not allowed for the current base architecture
57@ CHECK-V7: error: architectural extension 'crypto' is not allowed for the current base architecture
58@ CHECK-V7-NEXT:     .arch_extension nocrypto
59@ CHECK-V7-NEXT:                     ^
60
61	.type nocrypto,%function
62nocrypto:
63	vmull.p64 q0, d0, d1
64@ CHECK-V7: error: invalid instruction, any one of the following
65@ CHECK-V7: note: invalid operand for instruction
66@ CHECK-V7: note: instruction requires: aes armv8
67@ CHECK-V8: error: instruction requires: aes
68
69	aesd.8 q0, q1
70@ CHECK-V7: error: instruction requires: aes armv8
71@ CHECK-V8: error: instruction requires: aes
72	aese.8 q0, q1
73@ CHECK-V7: error: instruction requires: aes armv8
74@ CHECK-V8: error: instruction requires: aes
75	aesimc.8 q0, q1
76@ CHECK-V7: error: instruction requires: aes armv8
77@ CHECK-V8: error: instruction requires: aes
78	aesmc.8 q0, q1
79@ CHECK-V7: error: instruction requires: aes armv8
80@ CHECK-V8: error: instruction requires: aes
81
82	sha1h.32 q0, q1
83@ CHECK-V7: error: instruction requires: sha2 armv8
84@ CHECK-V8: error: instruction requires: sha2
85	sha1su1.32 q0, q1
86@ CHECK-V7: error: instruction requires: sha2 armv8
87@ CHECK-V8: error: instruction requires: sha2
88	sha256su0.32 q0, q1
89@ CHECK-V7: error: instruction requires: sha2 armv8
90@ CHECK-V8: error: instruction requires: sha2
91
92	sha1c.32 q0, q1, q2
93@ CHECK-V7: error: instruction requires: sha2 armv8
94@ CHECK-V8: error: instruction requires: sha2
95	sha1m.32 q0, q1, q2
96@ CHECK-V7: error: instruction requires: sha2 armv8
97@ CHECK-V8: error: instruction requires: sha2
98	sha1p.32 q0, q1, q2
99@ CHECK-V7: error: instruction requires: sha2 armv8
100@ CHECK-V8: error: instruction requires: sha2
101	sha1su0.32 q0, q1, q2
102@ CHECK-V7: error: instruction requires: sha2 armv8
103@ CHECK-V8: error: instruction requires: sha2
104	sha256h.32 q0, q1, q2
105@ CHECK-V7: error: instruction requires: sha2 armv8
106@ CHECK-V8: error: instruction requires: sha2
107	sha256h2.32 q0, q1, q2
108@ CHECK-V7: error: instruction requires: sha2 armv8
109@ CHECK-V8: error: instruction requires: sha2
110	sha256su1.32 q0, q1, q2
111@ CHECK-V7: error: instruction requires: sha2 armv8
112@ CHECK-V8: error: instruction requires: sha2
113
114