Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/alpha/gen we need a silly trampoline to make _...



details:   https://anonhg.NetBSD.org/src/rev/194ca598ead7
branches:  trunk
changeset: 558889:194ca598ead7
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Mar 01 19:26:29 2004 +0000

description:
we need a silly trampoline to make _resumecontext work

diffstat:

 lib/libc/arch/alpha/gen/Makefile.inc     |  3 ++-
 lib/libc/arch/alpha/gen/_resumecontext.S |  7 +++++++
 lib/libc/arch/alpha/gen/makecontext.c    |  8 +++++---
 3 files changed, 14 insertions(+), 4 deletions(-)

diffs (64 lines):

diff -r c352c3e7381c -r 194ca598ead7 lib/libc/arch/alpha/gen/Makefile.inc
--- a/lib/libc/arch/alpha/gen/Makefile.inc      Mon Mar 01 18:33:03 2004 +0000
+++ b/lib/libc/arch/alpha/gen/Makefile.inc      Mon Mar 01 19:26:29 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.16 2004/01/15 19:43:45 kleink Exp $
+#      $NetBSD: Makefile.inc,v 1.17 2004/03/01 19:26:29 drochner Exp $
 
 SRCS+= fabs.S 
 
@@ -17,6 +17,7 @@
 SRCS+= setjmp.S __setjmp14.S
 SRCS+= sigsetjmp.S __sigsetjmp14.S
 SRCS+= byte_swap_2.S byte_swap_4.S bswap64.c
+SRCS+= _resumecontext.S
 
 SRCS.alpha.gen=        Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c
 LSRCS+=                ${SRCS.alpha.gen}
diff -r c352c3e7381c -r 194ca598ead7 lib/libc/arch/alpha/gen/_resumecontext.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/alpha/gen/_resumecontext.S  Mon Mar 01 19:26:29 2004 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: _resumecontext.S,v 1.1 2004/03/01 19:26:29 drochner Exp $
+       
+#include <machine/asm.h>
+
+LEAF_NOPROFILE(__resumecontext, 0)
+       LDGP(ra)
+       CALL(_resumecontext)
diff -r c352c3e7381c -r 194ca598ead7 lib/libc/arch/alpha/gen/makecontext.c
--- a/lib/libc/arch/alpha/gen/makecontext.c     Mon Mar 01 18:33:03 2004 +0000
+++ b/lib/libc/arch/alpha/gen/makecontext.c     Mon Mar 01 19:26:29 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: makecontext.c,v 1.2 2003/01/18 11:04:39 thorpej Exp $  */
+/*     $NetBSD: makecontext.c,v 1.3 2004/03/01 19:26:29 drochner Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.2 2003/01/18 11:04:39 thorpej Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.3 2004/03/01 19:26:29 drochner Exp $");
 #endif
 
 #include <stddef.h>
@@ -56,6 +56,8 @@
        unsigned long *sp;
        va_list ap;
 
+       void __resumecontext(void);
+
        /* Compute and align stack pointer. */
        sp = (unsigned long *)
            (((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~0x7);
@@ -64,7 +66,7 @@
                sp -= (argc - 6);
        gr[_REG_SP] = (__greg_t)sp;
        /* Arrange for return via the trampoline code. */
-       gr[_REG_RA] = (__greg_t)_resumecontext;
+       gr[_REG_RA] = (__greg_t)__resumecontext;
        gr[_REG_PC] = (__greg_t)func;
        gr[_REG_PV] = (__greg_t)func;
 



Home | Main Index | Thread Index | Old Index