Skip to content
Snippets Groups Projects
Commit d5b7d9fa authored by Niels Möller's avatar Niels Möller
Browse files

* sparc/arcfour-crypt.asm: Improved instruction scheduling.

Rev: src/nettle/sparc/arcfour-crypt.asm:1.3
parent 06b3c49f
No related branches found
No related tags found
No related merge requests found
...@@ -60,19 +60,19 @@ PROLOGUE(nettle_arcfour_crypt) ...@@ -60,19 +60,19 @@ PROLOGUE(nettle_arcfour_crypt)
add I, 1, I add I, 1, I
and I, 0xff, I and I, 0xff, I
ldub [CTX + I], SI ldub [CTX + I], SI
subcc LENGTH,1,LENGTH
ldub [SRC], TMP
add J, SI, J add J, SI, J
and J, 0xff, J and J, 0xff, J
ldub [CTX + J], SJ ldub [CTX + J], SJ
stb SJ, [CTX + I] add SRC, 1, SRC
stb SI, [CTX + J] stb SI, [CTX + J]
add SI, SJ, SI add SI, SJ, SI
and SI, 0xff, SI and SI, 0xff, SI
ldub [CTX + SI], SI ldub [CTX + SI], SI
ldub [SRC], TMP stb SJ, [CTX + I]
xor TMP, SI, TMP xor TMP, SI, TMP
stb TMP, [DST] stb TMP, [DST]
subcc LENGTH,1,LENGTH
add SRC, 1, SRC
bne .Loop bne .Loop
add DST, 1, DST add DST, 1, DST
...@@ -91,7 +91,11 @@ C Some stats from adriana.lysator.liu.se (SS1000$, 85 MHz), for AES 128 ...@@ -91,7 +91,11 @@ C Some stats from adriana.lysator.liu.se (SS1000$, 85 MHz), for AES 128
C 1: nettle-1.13 C-code C 1: nettle-1.13 C-code
C 2: First working version of the assembler code C 2: First working version of the assembler code
C 3: Moved load of source byte
C 4: Better instruction scheduling
C MB/s cycles/byte Code size (bytes) C MB/s cycles/byte Code size (bytes)
C 1: 6.6 12.4 132 C 1: 6.6 12.4 132
C 2: 5.6 14.5 116 C 2: 5.6 14.5 116
C 3: 6.0 13.5 116
C 4: 6.5 12.4 116
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment