Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/m68k/gen When using the SVR4 ABI, return the p...
details: https://anonhg.NetBSD.org/src/rev/93f2b5db6c9c
branches: trunk
changeset: 472573:93f2b5db6c9c
user: kleink <kleink%NetBSD.org@localhost>
date: Sun May 02 20:09:29 1999 +0000
description:
When using the SVR4 ABI, return the pointer in a0, too.
diffstat:
lib/libc/arch/m68k/gen/alloca.S | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 1759818761fd -r 93f2b5db6c9c lib/libc/arch/m68k/gen/alloca.S
--- a/lib/libc/arch/m68k/gen/alloca.S Sun May 02 18:41:41 1999 +0000
+++ b/lib/libc/arch/m68k/gen/alloca.S Sun May 02 20:09:29 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alloca.S,v 1.3 1997/04/25 00:58:44 thorpej Exp $ */
+/* $NetBSD: alloca.S,v 1.4 1999/05/02 20:09:29 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -43,18 +43,21 @@
#if 0
RCSID("from: @(#)alloca.s 5.1 (Berkeley) 5/12/90")
#else
- RCSID("$NetBSD: alloca.S,v 1.3 1997/04/25 00:58:44 thorpej Exp $")
+ RCSID("$NetBSD: alloca.S,v 1.4 1999/05/02 20:09:29 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
/* like alloc, but automatic free in return */
ENTRY(alloca)
- movl sp@,a0 /* save return addr */
+ movl sp@,a1 /* save return addr */
movl sp,d0 /* get current SP value */
subl sp@(4),d0 /* allocate requested space */
andb #~3,d0 /* longword align for efficiency */
addql #8,d0 /* reuse space of call frame */
movl d0,sp /* set new SP value */
lea sp@(-4),sp /* account for argument pop in caller */
- jmp a0@ /* funny return */
+#ifdef __SVR4_ABI__
+ moveal d0,a0
+#endif
+ jmp a1@ /* funny return */
Home |
Main Index |
Thread Index |
Old Index