Commit 19632b17 authored by Niels Möller's avatar Niels Möller
Browse files

(_aes_crypt): More symbolic names.

Rev: src/nettle/sparc/aes.asm:1.14
parent 8c6bfb7f
......@@ -50,8 +50,11 @@ define(T, %o0)
define(length, %o4)
define(dst, %o3)
define(src, %o2)
define(wtxt, %l2)
! Why -136?
save %sp, -136, %sp
! Why this moving around of the input parameters?
......@@ -60,13 +63,15 @@ _aes_crypt:
mov %i1, T
mov %i3, dst
cmp length, 0
be .LL41
be .Lend
mov %i4, src
! wtxt?
add %fp, -24, %l1
mov %l1, %l2
mov %l1, wtxt
! Read src, and add initial subkey
mov 0, %i3
sll %i3, 2, %i2
add %i2, src, %i0
ldub [%i0+3], %g2
......@@ -83,9 +88,11 @@ _aes_crypt:
or %g2, %i0, %g2
xor %g2, %g3, %g2
cmp %i3, 3
bleu .LL17
st %g2, [%l2+%i2]
ld [ctx+240], %g2
bleu .Lsource_loop
st %g2, [wtxt+%i2]
! FIXME: We can safely assume that nrounds > 1
ld [ctx + AES_NROUNDS], %g2
mov 1, %g1
cmp %g1, %g2
bgeu,a .LL47
......@@ -96,7 +103,7 @@ _aes_crypt:
mov %l1, %g4
mov 0, %i5
add T, 288, %i4
add T, AES_IDX3, %i4
ld [%i4-32], %g3
sll %i5, 2, %i3
......@@ -199,9 +206,9 @@ _aes_crypt:
add %g4, 4, %g4
add dst, 16, dst
addcc length, -16, length
bne .LL13
bne .Lblock_loop
add src, 16, src
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment