We can shave off a register-register move when using the SVR4 ABI: __errno()

will return its pointer result in a0.
This commit is contained in:
kleink 1999-05-02 20:52:02 +00:00
parent 4e0adc06d5
commit 18d5ba6151
4 changed files with 20 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: Ovfork.S,v 1.8 1998/12/02 19:29:57 thorpej Exp $ */
/* $NetBSD: Ovfork.S,v 1.9 1999/05/02 20:52:02 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -43,7 +43,7 @@
#if 0
RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90")
#else
RCSID("$NetBSD: Ovfork.S,v 1.8 1998/12/02 19:29:57 thorpej Exp $")
RCSID("$NetBSD: Ovfork.S,v 1.9 1999/05/02 20:52:02 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -87,8 +87,12 @@ err:
#else
jbsr _C_LABEL(__errno)
#endif /* PIC */
#ifdef __SVR4_ABI__
movl sp@+,a0@
#else
movl d0,a1
movl sp@+,a1@
#endif /* __SVR4_ABI__ */
movl sp@+,a0
#else
.globl _C_LABEL(errno)

View File

@ -1,4 +1,4 @@
/* $NetBSD: __vfork14.S,v 1.3 1998/10/06 19:05:26 kleink Exp $ */
/* $NetBSD: __vfork14.S,v 1.4 1999/05/02 20:52:03 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -43,7 +43,7 @@
#if 0
RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90")
#else
RCSID("$NetBSD: __vfork14.S,v 1.3 1998/10/06 19:05:26 kleink Exp $")
RCSID("$NetBSD: __vfork14.S,v 1.4 1999/05/02 20:52:03 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -84,8 +84,12 @@ err:
#else
jbsr _C_LABEL(__errno)
#endif /* PIC */
#ifdef __SVR4_ABI__
movl sp@+,a0@
#else
movl d0,a1
movl sp@+,a1@
#endif
movl sp@+,a0
#else
.globl _C_LABEL(errno)

View File

@ -1,4 +1,4 @@
/* $NetBSD: cerror.S,v 1.10 1999/04/29 15:37:21 kleink Exp $ */
/* $NetBSD: cerror.S,v 1.11 1999/05/02 20:52:03 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -43,7 +43,7 @@
#if 0
RCSID("from: @(#)cerror.s 5.1 (Berkeley) 5/12/90")
#else
RCSID("$NetBSD: cerror.S,v 1.10 1999/04/29 15:37:21 kleink Exp $")
RCSID("$NetBSD: cerror.S,v 1.11 1999/05/02 20:52:03 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -63,7 +63,9 @@ _ENTRY(CERROR)
#else
jbsr _C_LABEL(__errno)
#endif
#ifndef __SVR4_ABI__
movl d0,a0
#endif
movl sp@+,a0@
#else
#ifdef PIC

View File

@ -1,4 +1,4 @@
/* $NetBSD: ptrace.S,v 1.6 1999/01/14 22:48:20 kleink Exp $ */
/* $NetBSD: ptrace.S,v 1.7 1999/05/02 20:52:03 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -43,7 +43,7 @@
#if 0
RCSID("from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90")
#else
RCSID("$NetBSD: ptrace.S,v 1.6 1999/01/14 22:48:20 kleink Exp $")
RCSID("$NetBSD: ptrace.S,v 1.7 1999/05/02 20:52:03 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@ -63,7 +63,9 @@ ENTRY(ptrace)
#else
jbsr _C_LABEL(__errno)
#endif /* PIC */
#ifndef __SVR4_ABI__
movl d0,a0
#endif
clrl a0@
#else
#ifdef PIC