Replaced instructions with immediate operands with compatible alternatives

saving a few bytes while the cycle count remains the same --- could
actually be faster, depending on the cache, prefetch queue, etc.
This commit is contained in:
jtc 1993-10-20 18:50:15 +00:00
parent 32661c1f77
commit 97ad548bc0
8 changed files with 38 additions and 38 deletions

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)_setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: _setjmp.S,v 1.1 1993/10/07 00:18:57 cgd Exp $"
.asciz "$Id: _setjmp.S,v 1.2 1993/10/20 18:50:15 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -61,7 +61,7 @@ ENTRY(_setjmp)
movl %ebp,12(%eax)
movl %esi,16(%eax)
movl %edi,20(%eax)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(_longjmp)
@ -73,8 +73,8 @@ ENTRY(_longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)_setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: _setjmp.s,v 1.1 1993/10/07 00:18:57 cgd Exp $"
.asciz "$Id: _setjmp.s,v 1.2 1993/10/20 18:50:15 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -61,7 +61,7 @@ ENTRY(_setjmp)
movl %ebp,12(%eax)
movl %esi,16(%eax)
movl %edi,20(%eax)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(_longjmp)
@ -73,8 +73,8 @@ ENTRY(_longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: setjmp.S,v 1.1 1993/10/07 00:19:09 cgd Exp $"
.asciz "$Id: setjmp.S,v 1.2 1993/10/20 18:50:17 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -66,7 +66,7 @@ ENTRY(setjmp)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl %eax,24(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(longjmp)
@ -82,8 +82,8 @@ ENTRY(longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: setjmp.s,v 1.1 1993/10/07 00:19:09 cgd Exp $"
.asciz "$Id: setjmp.s,v 1.2 1993/10/20 18:50:17 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -66,7 +66,7 @@ ENTRY(setjmp)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl %eax,24(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(longjmp)
@ -82,8 +82,8 @@ ENTRY(longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret

View File

@ -35,12 +35,12 @@
*
*
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"
* $Id: sigsetjmp.S,v 1.1 1993/10/19 20:44:00 jtc Exp $
* $Id: sigsetjmp.S,v 1.2 1993/10/20 18:50:18 jtc Exp $
*/
#if defined(LIBC_SCCS) && !defined(lint)
.text
.asciz "$Id: sigsetjmp.S,v 1.1 1993/10/19 20:44:00 jtc Exp $"
.asciz "$Id: sigsetjmp.S,v 1.2 1993/10/20 18:50:18 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
#include "DEFS.h"
@ -63,7 +63,7 @@ ENTRY(sigsetjmp)
movl %ebp,12(%ecx)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(siglongjmp)
@ -81,7 +81,7 @@ ENTRY(siglongjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
testl %eax,%eax
jne 2f
incl %eax
2: movl %ecx,0(%esp)

View File

@ -35,12 +35,12 @@
*
*
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"
* $Id: sigsetjmp.s,v 1.1 1993/10/19 20:44:00 jtc Exp $
* $Id: sigsetjmp.s,v 1.2 1993/10/20 18:50:18 jtc Exp $
*/
#if defined(LIBC_SCCS) && !defined(lint)
.text
.asciz "$Id: sigsetjmp.s,v 1.1 1993/10/19 20:44:00 jtc Exp $"
.asciz "$Id: sigsetjmp.s,v 1.2 1993/10/20 18:50:18 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
#include "DEFS.h"
@ -63,7 +63,7 @@ ENTRY(sigsetjmp)
movl %ebp,12(%ecx)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(siglongjmp)
@ -81,7 +81,7 @@ ENTRY(siglongjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
testl %eax,%eax
jne 2f
incl %eax
2: movl %ecx,0(%esp)

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: setjmp.S,v 1.1 1993/10/07 00:19:09 cgd Exp $"
.asciz "$Id: setjmp.S,v 1.2 1993/10/20 18:50:17 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -66,7 +66,7 @@ ENTRY(setjmp)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl %eax,24(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(longjmp)
@ -82,8 +82,8 @@ ENTRY(longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret

View File

@ -37,7 +37,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
.text
/*.asciz "from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"*/
.asciz "$Id: setjmp.S,v 1.1 1993/10/07 00:19:09 cgd Exp $"
.asciz "$Id: setjmp.S,v 1.2 1993/10/20 18:50:17 jtc Exp $"
#endif /* LIBC_SCCS and not lint */
/*
@ -66,7 +66,7 @@ ENTRY(setjmp)
movl %esi,16(%ecx)
movl %edi,20(%ecx)
movl %eax,24(%ecx)
movl $0,%eax
xorl %eax,%eax
ret
ENTRY(longjmp)
@ -82,8 +82,8 @@ ENTRY(longjmp)
movl 12(%edx),%ebp
movl 16(%edx),%esi
movl 20(%edx),%edi
cmpl $0,%eax
jne 1f
movl $1,%eax
testl %eax,%eax
jnz 1f
incl %eax
1: movl %ecx,0(%esp)
ret