avoid bswapl, which is post-i486 (including i486) insn. markus@openbsd
This commit is contained in:
parent
302df7965a
commit
08cbee504f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sha1_586.S,v 1.1 2003/11/13 02:10:00 itojun Exp $ */
|
||||
/* $NetBSD: sha1_586.S,v 1.2 2003/11/13 19:36:31 itojun Exp $ */
|
||||
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
@ -85,66 +85,98 @@ L000start:
|
||||
/* First, load the words onto the stack in network byte order */
|
||||
movl (%esi), %eax
|
||||
movl 4(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, (%esp)
|
||||
movl %ecx, 4(%esp)
|
||||
movl 8(%esi), %eax
|
||||
movl 12(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 8(%esp)
|
||||
movl %ecx, 12(%esp)
|
||||
movl 16(%esi), %eax
|
||||
movl 20(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 16(%esp)
|
||||
movl %ecx, 20(%esp)
|
||||
movl 24(%esi), %eax
|
||||
movl 28(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 24(%esp)
|
||||
movl %ecx, 28(%esp)
|
||||
movl 32(%esi), %eax
|
||||
movl 36(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 32(%esp)
|
||||
movl %ecx, 36(%esp)
|
||||
movl 40(%esi), %eax
|
||||
movl 44(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 40(%esp)
|
||||
movl %ecx, 44(%esp)
|
||||
movl 48(%esi), %eax
|
||||
movl 52(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 48(%esp)
|
||||
movl %ecx, 52(%esp)
|
||||
movl 56(%esi), %eax
|
||||
movl 60(%esi), %ecx
|
||||
.byte 15
|
||||
.byte 200 /* bswapl %eax */
|
||||
.byte 15
|
||||
.byte 201 /* bswapl %ecx */
|
||||
/* bswapl eax */
|
||||
xchg %al, %ah
|
||||
rorl $16, %eax
|
||||
xchg %al, %ah
|
||||
/* bswapl ecx */
|
||||
xchg %cl, %ch
|
||||
rorl $16, %ecx
|
||||
xchg %cl, %ch
|
||||
movl %eax, 56(%esp)
|
||||
movl %ecx, 60(%esp)
|
||||
/* We now have the X array on the stack */
|
||||
|
Loading…
Reference in New Issue
Block a user