Commit 79eb7d8d authored by Niels Möller's avatar Niels Möller

* x86/arcfour-crypt.asm: Use ARCFOUR_I and ARCFOUR_J

* asm.m4 (ARCFOUR): New struct.

Rev: src/nettle/asm.m4:1.15
Rev: src/nettle/x86/arcfour-crypt.asm:1.14
parent 611affba
......@@ -34,9 +34,18 @@ define(<STRUCT>,
<define(SPREFIX<_>$1, SOFFSET)dnl
define(<SOFFSET>, eval(SOFFSET + ($2)))>)dnl
dnl UCHAR(name)
define(<UCHAR>, <STRUCT(<$1>, 1)>)dnl
dnl UNSIGNED(name)
define(<UNSIGNED>, <STRUCT(<$1>, 4)>)dnl
dnl Offsets in arcfour_ctx
STRUCTURE(ARCFOUR)
STRUCT(S, 256)
UCHAR(I)
UCHAR(J)
dnl Offsets in aes_ctx and aes_table
STRUCTURE(AES)
STRUCT(KEYS, 4*60)
......
......@@ -55,8 +55,8 @@ C Register usage:
movl 32(%esp), %esi
addl %esi, %edx C Keep src + length
movzbl 256(%ebp), %eax C i
movzbl 257(%ebp), %ebx C j
movzbl ARCFOUR_I (%ebp), %eax C i
movzbl ARCFOUR_J (%ebp), %ebx C j
.Lloop:
C incb %al
incl %eax
......@@ -80,8 +80,8 @@ C andl $0xff, %ebx
cmpl %esi, %edx
jne .Lloop
movb %al, 256(%ebp) C Store the new i and j.
movb %bl, 257(%ebp)
movb %al, ARCFOUR_I (%ebp) C Store the new i and j.
movb %bl, ARCFOUR_J (%ebp)
.Lend:
popl %edi
popl %esi
......
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