diff options
-rw-r--r-- | src/libsec/386/md5block.spp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/libsec/386/md5block.spp b/src/libsec/386/md5block.spp index 602c970d..61d86c36 100644 --- a/src/libsec/386/md5block.spp +++ b/src/libsec/386/md5block.spp @@ -102,14 +102,16 @@ orl B, %edi;\ xorl C, %edi;\ -#define DATA 8 -#define LEN 12 -#define STATE 16 +#define STACKSIZE 20 -#define EDATA (-4) -#define OLDEBX (-8) -#define OLDESI (-12) -#define OLDEDI (-16) +#define DATA (STACKSIZE+8) +#define LEN (STACKSIZE+12) +#define STATE (STACKSIZE+16) + +#define EDATA (STACKSIZE-4) +#define OLDEBX (STACKSIZE-8) +#define OLDESI (STACKSIZE-12) +#define OLDEDI (STACKSIZE-16) .text @@ -120,6 +122,7 @@ /* Prelude */ pushl %ebp + subl $(STACKSIZE), %esp movl %ebx, OLDEBX(%esp) movl %esi, OLDESI(%esp) movl %edi, OLDEDI(%esp) @@ -235,7 +238,7 @@ mainloop: movl OLDEBX(%esp), %ebx movl OLDESI(%esp), %esi movl OLDEDI(%esp), %edi - movl %esp, %ebp - leave + addl $(STACKSIZE), %esp + popl %ebp ret |