From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- sysdeps/unix/bsd/sun/m68k/Dist | 1 - sysdeps/unix/bsd/sun/m68k/Makefile | 3 - sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h | 30 ------ sysdeps/unix/bsd/sun/m68k/brk.S | 49 ---------- sysdeps/unix/bsd/sun/m68k/dl-brk.S | 1 - sysdeps/unix/bsd/sun/m68k/sethostid.S | 44 --------- sysdeps/unix/bsd/sun/m68k/sigtramp.c | 145 ---------------------------- sysdeps/unix/bsd/sun/m68k/syscall.S | 28 ------ sysdeps/unix/bsd/sun/m68k/sysdep.h | 62 ------------ sysdeps/unix/bsd/sun/m68k/vfork.S | 56 ----------- 10 files changed, 419 deletions(-) delete mode 100644 sysdeps/unix/bsd/sun/m68k/Dist delete mode 100644 sysdeps/unix/bsd/sun/m68k/Makefile delete mode 100644 sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/brk.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/dl-brk.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sethostid.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sigtramp.c delete mode 100644 sysdeps/unix/bsd/sun/m68k/syscall.S delete mode 100644 sysdeps/unix/bsd/sun/m68k/sysdep.h delete mode 100644 sysdeps/unix/bsd/sun/m68k/vfork.S (limited to 'sysdeps/unix/bsd/sun/m68k') diff --git a/sysdeps/unix/bsd/sun/m68k/Dist b/sysdeps/unix/bsd/sun/m68k/Dist deleted file mode 100644 index cd893ff463..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/Dist +++ /dev/null @@ -1 +0,0 @@ -sigtramp.c diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile deleted file mode 100644 index ac4121dc2c..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(subdir),signal) -sysdep_routines := $(sysdep_routines) sigtramp -endif diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h deleted file mode 100644 index 99a0506a8d..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Structure describing state saved while handling a signal. Sun 3 version. - Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SIGNAL_H -# error "Never use directly; include instead." -#endif - -struct sigcontext - { - int sc_onstack; - __sigset_t sc_mask; - - int sc_sp, sc_pc, sc_ps; - }; diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S deleted file mode 100644 index 07af96d23c..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/brk.S +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#ifndef SYS_brk -#define SYS_brk 17 -#endif - -#ifndef HAVE_GNU_LD -#define __end _end -#endif - -.data -.globl ___curbrk -___curbrk: - .long __end - -.text -ENTRY (__brk) - movel #__end, d0 - cmpl sp@(4), d0 - ble 0f - movel d0, sp@(4) -0: pea SYS_brk - trap #0 - bcs 1f - movel sp@(4), ___curbrk - clrl d0 - rts -1: - jmp syscall_error - -weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/sun/m68k/dl-brk.S b/sysdeps/unix/bsd/sun/m68k/dl-brk.S deleted file mode 100644 index eeb96544e3..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/dl-brk.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S deleted file mode 100644 index 73ee79682e..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sethostid.S +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#ifdef SYS_sethostid - -SYSCALL (sethostid, 1) - ret - -#else - -#include - -.globl _sethostid -.even -_sethostid: - movel #ENOSYS, _errno - moveq #-1, d0 - rts - -#ifdef HAVE_GNU_LD - -.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 -.stabs "_sethostid",1,0,0,0 - -#endif - -#endif diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c deleted file mode 100644 index 5a3ca3cf10..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (C) 1993, 1996, 1997, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* Get the definition of `struct sigcontext'. */ -#define KERNEL -#define sigvec sun_sigvec -#define sigstack sun_sigstack -#define sigcontext sun_sigcontext -#include "/usr/include/sys/signal.h" -#undef sigvec -#undef sigstack -#undef sigcontext -#undef NSIG -#undef SIGABRT -#undef SIGCLD -#undef SV_ONSTACK -#undef SV_RESETHAND -#undef SV_INTERRUPT -#undef SA_ONSTACK -#undef SA_NOCLDSTOP -#undef SIG_ERR -#undef SIG_DFL -#undef SIG_IGN -#undef sigmask -#undef SIG_BLOCK -#undef SIG_UNBLOCK -#undef SIG_SETMASK - -#include -#include -#include - -/* Defined in __sigvec.S. */ -extern int __raw_sigvec (int sig, const struct sigvec *vec, - struct sigvec *ovec); - -/* User-specified signal handlers. */ -#define mytramp 1 -#ifdef mytramp -static __sighandler_t handlers[NSIG]; -#else -#define handlers _sigfunc -extern __sighandler_t _sigfunc[]; -#endif - -#if mytramp - -/* Handler for all signals that are handled by a user-specified function. - Saves and restores the general regs %g2-%g7, the %y register, and - all the FPU regs (including %fsr), around calling the user's handler. */ -static void -trampoline (sig, code, context, addr) - int sig; - int code; - struct sigcontext *context; - void *addr; -{ - int save[4]; - - /* Save the call-clobbered registers. */ - asm volatile ("movem%.l d0-d1/a0-a1, %0" : : "m" (save[0])); - - /* XXX should save/restore FP regs */ - - /* Call the user's handler. */ - (*((void (*) (int sig, int code, struct sigcontext *context, - PTR addr)) handlers[sig])) - (sig, code, context, addr); - - /* Restore the call-clobbered registers. */ - asm volatile ("movem%.l %0, d0-d1/a0-a1" : : "g" (save[0]) : - "d0", "d1", "a0", "a1"); - - __sigreturn (context); -} - -#endif - -int -__sigvec (sig, vec, ovec) - int sig; - const struct sigvec *vec; - struct sigvec *ovec; -{ -#ifndef mytramp - extern void _sigtramp (int); -#define trampoline _sigtramp -#endif - struct sigvec myvec; - int mask; - __sighandler_t ohandler; - - if (sig <= 0 || sig >= NSIG) - { - __set_errno (EINVAL); - return -1; - } - - mask = __sigblock(sigmask(sig)); - - ohandler = handlers[sig]; - - if (vec != NULL && - vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL) - { - handlers[sig] = vec->sv_handler; - myvec = *vec; - myvec.sv_handler = trampoline; - vec = &myvec; - } - - if (__raw_sigvec(sig, vec, ovec) < 0) - { - int save = errno; - (void) __sigsetmask(mask); - errno = save; - return -1; - } - - if (ovec != NULL && ovec->sv_handler == trampoline) - ovec->sv_handler = ohandler; - - (void) __sigsetmask(mask); - - return 0; -} diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S deleted file mode 100644 index 1d4d5be42f..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/syscall.S +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -ENTRY (syscall) - movel sp@, d0 /* Save return address in D0. */ - movel sp@(4), sp@ /* Put syscall number at top of stack. */ - movel d0, sp@(4) /* Put return address under it. */ - trap #0 /* Do syscall; pops number from stack. */ - jcs error - ret -error: jmp syscall_error diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h deleted file mode 100644 index e51ab0a8e4..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/sysdep.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#ifdef __ASSEMBLER__ - -#define POUND # - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - pea SYS_##syscall_name; \ - trap POUND 0; \ - bcs error -#else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - pea SYS_/**/syscall_name; \ - trap POUND 0; \ - bcs error -#endif - -#define ret rts -#define r0 d0 -#define r1 d1 -#define MOVE(x,y) movel x , y - -#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S deleted file mode 100644 index cf9e2e9e1a..0000000000 --- a/sysdeps/unix/bsd/sun/m68k/vfork.S +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -#ifndef SYS_vfork -#define SYS_vfork 66 -#endif - -/* Clone the calling process, but without copying the whole address space. - The calling process is suspended until the new process exits or is - replaced by a call to `execve'. Return -1 for errors, 0 to the new process, - and the process ID of the new process to the old process. */ -.globl ___vfork -___vfork: - /* Pop the return PC value into A0. */ - movel sp@+, a0 - - /* Push the syscall number and trap into the kernel. */ - movel #SYS_vfork, sp@- - trap #0 - bcs error /* Branch forward if it failed. */ - - /* It succeeded. See which fork we're in. D1 is now 0 for the - parent and 1 for the child. Decrement it to make it -1 (all - bits set) for the parent, and 0 (no bits set) for the child. - Then AND it with D0, so the parent gets D0&-1==R0, and the child - gets D0&0==0. */ - subql #1, d1 - andl d1, d0 - - /* Jump to the return PC. */ - jmp a0@ - -error: - movel d0, _errno - moveq #-1, d0 - jmp a0@ -libc_hidden_def (__vfork) - -weak_alias (__vfork, vfork) -- cgit v1.2.3