Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 77 additions & 35 deletions crates/verified-garbage-asm-aarch64/assembly/gcm.s
Original file line number Diff line number Diff line change
Expand Up @@ -18294,6 +18294,14 @@ vg_aes_gcm_open_with_powers_aes_sha3:
.p2align 6

vg_aes_gcm_open_to_with_powers_aes_sha3:
sub x9, x7, #768
lsr x9, x9, #63
lsr x10, x5, #4
orr x10, x10, x9
movz x9, #12, lsl #0
eor x9, x3, x9
orr x10, x10, x9
cbz x10, 20f
sub sp, sp, #32
add x16, sp, #0
str x30, [x16, #24]
Expand All @@ -18307,78 +18315,112 @@ vg_aes_gcm_open_to_with_powers_aes_sha3:
add x12, x6, #0
add x13, x7, #0
lsr x14, x13, #4
cbz x14, 20f
22:
cbz x14, 22f
24:
ldr q0, [x12, #0]
str q0, [x11, #0]
add x12, x12, #16
add x11, x11, #16
sub x14, x14, #1
cbnz x14, 22b
b 21f
20:
21:
cbnz x14, 24b
b 23f
22:
23:
movz x15, #15, lsl #0
and x13, x13, x15
cbz x13, 23f
cbz x13, 25f
lsr x14, x13, #3
cbz x14, 25f
27:
cbz x14, 27f
29:
ldr x14, [x12, #0]
str x14, [x11, #0]
add x12, x12, #8
add x11, x11, #8
sub x13, x13, #8
lsr x14, x13, #3
cbnz x14, 27b
b 26f
25:
26:
cbnz x14, 29b
b 28f
27:
28:
lsr x14, x13, #2
cbz x14, 28f
cbz x14, 210f
ldr w14, [x12, #0]
str w14, [x11, #0]
add x12, x12, #4
add x11, x11, #4
sub x13, x13, #4
b 29f
28:
29:
cbz x13, 210f
212:
b 211f
210:
211:
cbz x13, 212f
214:
ldrb w14, [x12, #0]
strb w14, [x11, #0]
add x12, x12, #1
add x11, x11, #1
sub x13, x13, #1
cbnz x13, 212b
b 211f
210:
211:
b 24f
23:
24:
cbnz x13, 214b
b 213f
212:
213:
b 26f
25:
26:
ldr x6, [sp, #32]
bl {vg_aes_gcm_open_with_powers_aes_sha3}
cbz w0, 213f
b 214f
213:
cbz w0, 215f
b 216f
215:
ldr x9, [sp, #32]
ldr x10, [sp, #40]
movz x11, #0, lsl #0
cbz x10, 215f
217:
cbz x10, 217f
219:
strb w11, [x9, #0]
add x9, x9, #1
sub x10, x10, #1
cbnz x10, 217b
b 216f
215:
cbnz x10, 219b
b 218f
217:
218:
216:
214:
ldr x30, [sp, #24]
add sp, sp, #32
21:
ret
20:
sub sp, sp, #48
add x16, sp, #0
str x30, [x16, #40]
ldr x17, [sp, #64]
str x17, [x16, #0]
ldr x17, [sp, #72]
str x17, [x16, #8]
ldr x17, [sp, #80]
str x17, [x16, #16]
str x6, [x16, #24]
str x7, [x16, #32]
ldr x6, [sp, #48]
bl {vg_aes_gcm_open_split_with_powers_aes_sha3}
cbz w0, 220f
b 221f
220:
ldr x9, [sp, #48]
ldr x10, [sp, #56]
movz x11, #0, lsl #0
cbz x10, 222f
224:
strb w11, [x9, #0]
add x9, x9, #1
sub x10, x10, #1
cbnz x10, 224b
b 223f
222:
223:
221:
ldr x30, [sp, #40]
add sp, sp, #48
b 21b
.p2align 6

vg_aes_gcm_init:
Expand Down
Loading
Loading