• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-mc -triple arm64-apple-darwin -mattr=crypto -show-encoding -output-asm-variant=1 < %s | FileCheck %s
2
3foo:
4  aese.16b v0, v1
5  aesd.16b v0, v1
6  aesmc.16b v0, v1
7  aesimc.16b v0, v1
8
9  sha1c.4s q0, s1, v2
10  sha1p.4s q0, s1, v2
11  sha1m.4s q0, s1, v2
12  sha1su0.4s v0, v1, v2
13  sha256h.4s q0, q1, v2
14  sha256h2.4s q0, q1, v2
15  sha256su1.4s v0, v1, v2
16  sha1h s0, s1
17  sha1su1.4s v0, v1
18  sha256su0.4s v0, v1
19
20; CHECK: aese.16b v0, v1               ; encoding: [0x20,0x48,0x28,0x4e]
21; CHECK: aesd.16b v0, v1               ; encoding: [0x20,0x58,0x28,0x4e]
22; CHECK: aesmc.16b v0, v1              ; encoding: [0x20,0x68,0x28,0x4e]
23; CHECK: aesimc.16b v0, v1             ; encoding: [0x20,0x78,0x28,0x4e]
24
25; CHECK: sha1c.4s q0, s1, v2           ; encoding: [0x20,0x00,0x02,0x5e]
26; CHECK: sha1p.4s q0, s1, v2           ; encoding: [0x20,0x10,0x02,0x5e]
27; CHECK: sha1m.4s q0, s1, v2           ; encoding: [0x20,0x20,0x02,0x5e]
28; CHECK: sha1su0.4s v0, v1, v2         ; encoding: [0x20,0x30,0x02,0x5e]
29; CHECK: sha256h.4s q0, q1, v2         ; encoding: [0x20,0x40,0x02,0x5e]
30; CHECK: sha256h2.4s q0, q1, v2        ; encoding: [0x20,0x50,0x02,0x5e]
31; CHECK: sha256su1.4s v0, v1, v2       ; encoding: [0x20,0x60,0x02,0x5e]
32; CHECK: sha1h s0, s1                  ; encoding: [0x20,0x08,0x28,0x5e]
33; CHECK: sha1su1.4s v0, v1             ; encoding: [0x20,0x18,0x28,0x5e]
34; CHECK: sha256su0.4s v0, v1           ; encoding: [0x20,0x28,0x28,0x5e]
35
36  aese v2.16b, v3.16b
37  aesd v5.16b, v7.16b
38  aesmc v11.16b, v13.16b
39  aesimc v17.16b, v19.16b
40
41; CHECK: aese.16b v2, v3            ; encoding: [0x62,0x48,0x28,0x4e]
42; CHECK: aesd.16b v5, v7            ; encoding: [0xe5,0x58,0x28,0x4e]
43; CHECK: aesmc.16b v11, v13         ; encoding: [0xab,0x69,0x28,0x4e]
44; CHECK: aesimc.16b v17, v19        ; encoding: [0x71,0x7a,0x28,0x4e]
45
46  sha1c q23, s29, v3.4s
47  sha1p q14, s15, v9.4s
48  sha1m q2, s6, v5.4s
49  sha1su0 v3.4s, v5.4s, v9.4s
50  sha256h q2, q7, v18.4s
51  sha256h2 q28, q18, v28.4s
52  sha256su1 v4.4s, v5.4s, v9.4s
53  sha1h s30, s0
54  sha1su1 v10.4s, v21.4s
55  sha256su0 v2.4s, v31.4s
56
57; CHECK: sha1c.4s q23, s29, v3       ; encoding: [0xb7,0x03,0x03,0x5e]
58; CHECK: sha1p.4s q14, s15, v9       ; encoding: [0xee,0x11,0x09,0x5e]
59; CHECK: sha1m.4s q2, s6, v5         ; encoding: [0xc2,0x20,0x05,0x5e]
60; CHECK: sha1su0.4s v3, v5, v9       ; encoding: [0xa3,0x30,0x09,0x5e]
61; CHECK: sha256h.4s q2, q7, v18      ; encoding: [0xe2,0x40,0x12,0x5e]
62; CHECK: sha256h2.4s q28, q18, v28   ; encoding: [0x5c,0x52,0x1c,0x5e]
63; CHECK: sha256su1.4s v4, v5, v9     ; encoding: [0xa4,0x60,0x09,0x5e]
64; CHECK: sha1h s30, s0               ; encoding: [0x1e,0x08,0x28,0x5e]
65; CHECK: sha1su1.4s v10, v21         ; encoding: [0xaa,0x1a,0x28,0x5e]
66; CHECK: sha256su0.4s v2, v31        ; encoding: [0xe2,0x2b,0x28,0x5e]
67