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

(AES_FINAL_ROUND): Work to eliminate t3.

Rev: src/nettle/sparc/aes.asm:1.109
parent 2f4c861d
...@@ -111,35 +111,33 @@ define(<AES_FINAL_ROUND>, < ...@@ -111,35 +111,33 @@ define(<AES_FINAL_ROUND>, <
ldub [wtxt+$1+3], t0 ! 0 ldub [wtxt+$1+3], t0 ! 0
ldub [wtxt+t1], t1 ! 1 ldub [wtxt+t1], t1 ! 1
ldub [T+t0], t0 ! 0 ldub [T+t0], t0 ! 0
ldub [T+t1], t1 ! 1 ldub [T+t1], t1 ! 1
ld [IDX3 + $1], t3 ! 3 ld [IDX3 + $1], t3 ! 3
sll t1, 8, t1 ! 1 sll t1, 8, t1 ! 1
or t0, t1, t0 ! 0, 1 or t0, t1, t0 ! 0, 1
! IDX2(j) = j XOR 2 ! IDX2(j) = j XOR 2
ldub [wtxt+eval($1 ^ 8)+1], t2 ! 2 ldub [wtxt+eval($1 ^ 8)+1], t1 ! 2
ldub [wtxt+t3], t3 ! 3 ldub [wtxt+t3], t3 ! 3
ldub [T+t2], t2 ! 2 ldub [T+t1], t1 ! 2
ldub [T+t3], t3 ! 3 ldub [T+t3], t2 ! 3
sll t2, 16, t2 ! 2 sll t1, 16, t1 ! 2
or t0, t2, t0 ! 0, 1, 2 or t0, t1, t0 ! 0, 1, 2
sll t3, 24, t3 ! 3 sll t2, 24, t2 ! 3
ld [key + $1], t2 ld [key + $1], t1
or t0, t3, t0 ! 0, 1, 2, 3 or t0, t2, t0 ! 0, 1, 2, 3
xor t0, t2, t0 xor t0, t1, t0
srl t0, 24, t1
stb t1, [dst+$1+3]
srl t0, 24, t3 srl t0, 16, t1
srl t0, 16, t2 stb t1, [dst+$1+2]
srl t0, 8, t1 srl t0, 8, t1
stb t1, [dst+$1+1] stb t1, [dst+$1+1]
stb t3, [dst+$1+3]
stb t2, [dst+$1+2]
stb t0, [dst+$1]>)dnl stb t0, [dst+$1]>)dnl
C The stack frame looks like C The stack frame looks like
......
Markdown is supported
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