1 // RUN: not llvm-mc -triple aarch64 -mattr=+sha3,-sm4 -show-encoding < %s 2> %t | FileCheck %s --check-prefix=CHECK-SHA
2 // RUN: FileCheck --check-prefix=CHECK-NO-SM < %t %s
4 // RUN: not llvm-mc -triple aarch64 -mattr=+sm4,-sha3 -show-encoding < %s 2> %t | FileCheck %s --check-prefix=CHECK-SM
5 // RUN: FileCheck --check-prefix=CHECK-NO-SHA < %t %s
7 // RUN: not llvm-mc -triple aarch64 -show-encoding < %s 2> %t
8 // RUN: FileCheck --check-prefix=CHECK-NO-SHA --check-prefix=CHECK-NO-SM < %t %s
11 sha512h2 q0, q1, v2.2d
12 sha512su0 v11.2d, v12.2d
13 sha512su1 v11.2d, v13.2d, v14.2d
14 eor3 v25.16b, v12.16b, v7.16b, v2.16b
15 rax1 v30.2d, v29.2d, v26.2d
16 xar v26.2d, v21.2d, v27.2d, #63
17 bcax v31.16b, v26.16b, v2.16b, v1.16b
19 //CHECK-SHA: sha512h q0, q1, v2.2d // encoding: [0x20,0x80,0x62,0xce]
20 //CHECK-SHA: sha512h2 q0, q1, v2.2d // encoding: [0x20,0x84,0x62,0xce]
21 //CHECK-SHA: sha512su0 v11.2d, v12.2d // encoding: [0x8b,0x81,0xc0,0xce]
22 //CHECK-SHA: sha512su1 v11.2d, v13.2d, v14.2d // encoding: [0xab,0x89,0x6e,0xce]
23 //CHECK-SHA: eor3 v25.16b, v12.16b, v7.16b, v2.16b // encoding: [0x99,0x09,0x07,0xce]
24 //CHECK-SHA: rax1 v30.2d, v29.2d, v26.2d // encoding: [0xbe,0x8f,0x7a,0xce]
25 //CHECK-SHA: xar v26.2d, v21.2d, v27.2d, #63 // encoding: [0xba,0xfe,0x9b,0xce]
26 //CHECK-SHA: bcax v31.16b, v26.16b, v2.16b, v1.16b // encoding: [0x5f,0x07,0x22,0xce]
29 // CHECK-NO-SHA: error: instruction requires: sha3
30 // CHECK-NO-SHA: error: instruction requires: sha3
31 // CHECK-NO-SHA: error: instruction requires: sha3
32 // CHECK-NO-SHA: error: instruction requires: sha3
33 // CHECK-NO-SHA: error: instruction requires: sha3
34 // CHECK-NO-SHA: error: instruction requires: sha3
35 // CHECK-NO-SHA: error: instruction requires: sha3
36 // CHECK-NO-SHA: error: instruction requires: sha3
38 sm3ss1 v20.4s, v23.4s, v21.4s, v22.4s
39 sm3tt1a v20.4s, v23.4s, v21.s[3]
40 sm3tt1b v20.4s, v23.4s, v21.s[3]
41 sm3tt2a v20.4s, v23.4s, v21.s[3]
42 sm3tt2b v20.4s, v23.4s, v21.s[3]
43 sm3partw1 v30.4s, v29.4s, v26.4s
44 sm3partw2 v30.4s, v29.4s, v26.4s
45 sm4ekey v11.4s, v11.4s, v19.4s
48 // CHECK-SM: sm3ss1 v20.4s, v23.4s, v21.4s, v22.4s // encoding: [0xf4,0x5a,0x55,0xce]
49 // CHECK-SM: sm3tt1a v20.4s, v23.4s, v21.s[3] // encoding: [0xf4,0xb2,0x55,0xce]
50 // CHECK-SM: sm3tt1b v20.4s, v23.4s, v21.s[3] // encoding: [0xf4,0xb6,0x55,0xce]
51 // CHECK-SM: sm3tt2a v20.4s, v23.4s, v21.s[3] // encoding: [0xf4,0xba,0x55,0xce]
52 // CHECK-SM: sm3tt2b v20.4s, v23.4s, v21.s[3] // encoding: [0xf4,0xbe,0x55,0xce]
53 // CHECK-SM: sm3partw1 v30.4s, v29.4s, v26.4s // encoding: [0xbe,0xc3,0x7a,0xce]
54 // CHECK-SM: sm3partw2 v30.4s, v29.4s, v26.4s // encoding: [0xbe,0xc7,0x7a,0xce]
55 // CHECK-SM: sm4ekey v11.4s, v11.4s, v19.4s // encoding: [0x6b,0xc9,0x73,0xce]
56 // CHECK-SM: sm4e v2.4s, v15.4s // encoding: [0xe2,0x85,0xc0,0xce]
58 // CHECK-NO-SM: error: instruction requires: sm4
59 // CHECK-NO-SM: error: instruction requires: sm4
60 // CHECK-NO-SM: error: instruction requires: sm4
61 // CHECK-NO-SM: error: instruction requires: sm4
62 // CHECK-NO-SM: error: instruction requires: sm4
63 // CHECK-NO-SM: error: instruction requires: sm4
64 // CHECK-NO-SM: error: instruction requires: sm4