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

(_aes_crypt): Access IDX1 and IDX3 through the T pointer, saving

two registers.

Rev: src/nettle/sparc/aes.asm:1.93
parent ab8ed037
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
! (see gcc/config/sparc.h). We should use only %g1-%g3 to be safe. ! (see gcc/config/sparc.h). We should use only %g1-%g3 to be safe.
! Used registers: %l0,1,2,3,4,5,6,7 ! Used registers: %l0,1,2,3,4,5,6,7
! %i0,1,2,3,4,5 (%i6=%fp, %i7 = return) ! %i0,1,2,3,4 (%i6=%fp, %i7 = return)
! %o0,1,2,3,4,5,7 (%o6=%sp) ! %o0,1,2,3,4,7 (%o6=%sp)
! %g1,2,3,5 ! %g1,2,3,5
.file "aes.asm" .file "aes.asm"
...@@ -57,9 +57,10 @@ define(T0, %l6) ...@@ -57,9 +57,10 @@ define(T0, %l6)
define(T1, %l7) define(T1, %l7)
define(T2, %g5) define(T2, %g5)
define(T3, %o7) define(T3, %o7)
define(IDX1, %i5) C define(IDX1, %i5)
C define(IDX1, <T + AES_SIDX1 >) define(IDX1, <T + AES_SIDX1 >)
define(IDX3, %o5) C define(IDX3, %o5)
define(IDX3, <T + AES_SIDX3 >)
! Teporaries ! Teporaries
define(t0, %o0) define(t0, %o0)
...@@ -95,9 +96,9 @@ _aes_crypt: ...@@ -95,9 +96,9 @@ _aes_crypt:
add T, AES_TABLE1, T1 add T, AES_TABLE1, T1
add T, AES_TABLE2, T2 add T, AES_TABLE2, T2
add T, AES_TABLE3, T3 add T, AES_TABLE3, T3
add T, AES_SIDX1, IDX1 C add T, AES_SIDX1, IDX1
add T, AES_SIDX3, IDX3 C add T, AES_SIDX3, IDX3
! Read src, and add initial subkey ! Read src, and add initial subkey
! Difference between ctx and src. ! Difference between ctx and src.
! NOTE: These instructions are duplicated in the delay slot, ! NOTE: These instructions are duplicated in the delay slot,
......
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