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 Use assym.h
details: https://anonhg.NetBSD.org/src/rev/3b5bfe14f660
branches: trunk
changeset: 787973:3b5bfe14f660
user: matt <matt%NetBSD.org@localhost>
date: Wed Jul 17 03:01:27 2013 +0000
description:
Use assym.h
diffstat:
lib/libc/arch/m68k/gen/resumecontext.S | 9 +++++----
lib/libc/arch/m68k/gen/setjmp.S | 23 ++++++++++++-----------
lib/libc/arch/m68k/gen/swapcontext.S | 9 +++++----
lib/libc/arch/m68k/sys/getcontext.S | 11 ++++++-----
4 files changed, 28 insertions(+), 24 deletions(-)
diffs (160 lines):
diff -r e790a286fa49 -r 3b5bfe14f660 lib/libc/arch/m68k/gen/resumecontext.S
--- a/lib/libc/arch/m68k/gen/resumecontext.S Wed Jul 17 01:41:17 2013 +0000
+++ b/lib/libc/arch/m68k/gen/resumecontext.S Wed Jul 17 03:01:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: resumecontext.S,v 1.7 2013/07/16 22:12:20 matt Exp $ */
+/* $NetBSD: resumecontext.S,v 1.8 2013/07/17 03:04:54 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,9 +30,10 @@
*/
#include <machine/asm.h>
+#include "assym.h"
#if defined(LIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: resumecontext.S,v 1.7 2013/07/16 22:12:20 matt Exp $")
+ RCSID("$NetBSD: resumecontext.S,v 1.8 2013/07/17 03:04:54 matt Exp $")
#endif /* LIBC_SCCS && !lint */
/*
@@ -42,11 +43,11 @@
*/
ENTRY(_resumecontext)
- subl #(4 + 1024),%sp /* retaddr preservation + ucontext_t */
+ subl #(4 + UC_SIZE),%sp /* retaddr preservation + ucontext_t */
lea (%sp),%a0
movl %a0,-(%sp)
jbsr PIC_PLT(_C_LABEL(_getcontext))
- movl (4 + 4)(%sp),(%sp) /* uc_link */
+ movl (4 + UC_LINK)(%sp),(%sp) /* uc_link */
tstl (%sp) /* check for NULL */
jne 1f
jbsr PIC_PLT(_C_LABEL(exit)) /* cleanly exit(0) */
diff -r e790a286fa49 -r 3b5bfe14f660 lib/libc/arch/m68k/gen/setjmp.S
--- a/lib/libc/arch/m68k/gen/setjmp.S Wed Jul 17 01:41:17 2013 +0000
+++ b/lib/libc/arch/m68k/gen/setjmp.S Wed Jul 17 03:01:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setjmp.S,v 1.14 2013/07/16 22:12:20 matt Exp $ */
+/* $NetBSD: setjmp.S,v 1.15 2013/07/17 03:05:41 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -34,12 +34,13 @@
*/
#include <machine/asm.h>
+#include "assym.h"
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
RCSID("from: @(#)setjmp.s 5.1 (Berkeley) 5/12/90")
#else
- RCSID("$NetBSD: setjmp.S,v 1.14 2013/07/16 22:12:20 matt Exp $")
+ RCSID("$NetBSD: setjmp.S,v 1.15 2013/07/17 03:05:41 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
@@ -67,11 +68,11 @@
/* Get pointer to jmp_buf; a sigcontext is at the beginning. */
movl 4(%sp),%a0
- movl %d0,(%a0) /* store onstack */
- clrl 4(%a0) /* unused word (old style signal mask) */
+ movl %d0,SC_ONSTACK(%a0) /* store onstack */
+ clrl SC___MASK13(%a0) /* unused word (old style signal mask) */
/* Get the signal mask. */
- pea 28(%a0) /* oset = &sc.sc_mask */
+ pea SC_MASK(%a0) /* oset = &sc.sc_mask */
movl #0,-(%sp) /* set = NULL */
movl #0,-(%sp) /* action = 0 <ignored> */
jbsr PIC_PLT(_C_LABEL(__sigprocmask14))
@@ -79,14 +80,14 @@
movl 4(%sp),%a0 /* get jmp_buf pointer again */
lea 4(%sp),%a1 /* adjust SP since we won't rts */
- movl %a1,8(%a0) /* save SP */
- movl %a6,12(%a0) /* save FP */
- clrl 16(%a0) /* no AP */
- movl (%sp),20(%a0) /* save return PC */
- clrl 24(%a0) /* clear PS */
+ movl %a1,SC_SP(%a0) /* save SP */
+ movl %a6,SC_FP(%a0) /* save FP */
+ clrl SC_AP(%a0) /* no AP */
+ movl (%sp),SC_PC(%a0)/* save return PC */
+ clrl SC_PS(%a0) /* clear PS */
/* Save remaining non-scratch regs after signal mask. */
- moveml #0x3CFC,44(%a0)
+ moveml #0x3CFC,SC_SIZE(%a0)
clrl %d0 /* return 0 */
rts
diff -r e790a286fa49 -r 3b5bfe14f660 lib/libc/arch/m68k/gen/swapcontext.S
--- a/lib/libc/arch/m68k/gen/swapcontext.S Wed Jul 17 01:41:17 2013 +0000
+++ b/lib/libc/arch/m68k/gen/swapcontext.S Wed Jul 17 03:01:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: swapcontext.S,v 1.5 2013/07/16 22:12:20 matt Exp $ */
+/* $NetBSD: swapcontext.S,v 1.6 2013/07/17 03:05:17 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,9 +30,10 @@
*/
#include "SYS.h"
+#include "assym.h"
#if defined(LIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: swapcontext.S,v 1.5 2013/07/16 22:12:20 matt Exp $")
+ RCSID("$NetBSD: swapcontext.S,v 1.6 2013/07/17 03:05:17 matt Exp $")
#endif /* LIBC_SCCS && !lint */
ENTRY(swapcontext)
@@ -41,8 +42,8 @@
tstl %d0 | OK?
jne L1
movl (%sp),%a0
- addql #8,96(%a0) | adjust saved stack pointer (again)
- movl 4(%sp),100(%a0) | adjust saved program counter (again)
+ addql #8,UC_MCONTEXT_SP(%a0) | adjust saved stack pointer (again)
+ movl %sp@(4),UC_MCONTEXT_PC(%a0) | adjust saved program counter (again)
movl 12(%sp),(%sp) | push ucp on stack
jbsr PIC_PLT(_C_LABEL(setcontext)) | setcontext(ucp)
L1: addql #4,%sp | pop ucp
diff -r e790a286fa49 -r 3b5bfe14f660 lib/libc/arch/m68k/sys/getcontext.S
--- a/lib/libc/arch/m68k/sys/getcontext.S Wed Jul 17 01:41:17 2013 +0000
+++ b/lib/libc/arch/m68k/sys/getcontext.S Wed Jul 17 03:01:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcontext.S,v 1.5 2013/07/16 22:15:55 matt Exp $ */
+/* $NetBSD: getcontext.S,v 1.6 2013/07/17 03:01:27 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,9 +30,10 @@
*/
#include "SYS.h"
+#include "assym.h"
#if defined(SYSLIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: getcontext.S,v 1.5 2013/07/16 22:15:55 matt Exp $")
+ RCSID("$NetBSD: getcontext.S,v 1.6 2013/07/17 03:01:27 matt Exp $")
#endif /* SYSLIBC_SCCS && !lint */
#ifdef WEAK_ALIAS
@@ -41,8 +42,8 @@
_SYSCALL(_getcontext,getcontext)
movl 4(%sp),%a0
- addql #4,96(%a0) | adjust saved stack pointer
- movl (%sp),100(%a0) | adjust saved program counter
- clrl 36(%a0) | arrange for return value of 0
+ addql #4,UC_MCONTEXT_SP(%a0) | adjust saved stack pointer
+ movl %sp@,UC_MCONTEXT_PC(%a0)| adjust saved program counter
+ clrl UC_MCONTEXT_D0(%a0) | arrange for return value of 0
rts
END(_getcontext)
Home |
Main Index |
Thread Index |
Old Index