mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
entered into RCS
This commit is contained in:
parent
6e1bdbcff1
commit
5cc7ff46d7
1
sysdeps/unix/bsd/sun/m68k/Dist
Normal file
1
sysdeps/unix/bsd/sun/m68k/Dist
Normal file
@ -0,0 +1 @@
|
||||
sigtramp.c
|
@ -1 +1,3 @@
|
||||
include $(+sysdep_dir)/unix/bsd/hp9k3bsd/Makefile
|
||||
ifeq ($(subdir),signal)
|
||||
sysdep_routines := $(sysdep_routines) sigtramp
|
||||
endif
|
||||
|
26
sysdeps/unix/bsd/sun/m68k/sigcontext.h
Normal file
26
sysdeps/unix/bsd/sun/m68k/sigcontext.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Structure describing state saved while handling a signal. Sun 3 version.
|
||||
Copyright (C) 1993 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 Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
struct sigcontext
|
||||
{
|
||||
int sc_onstack;
|
||||
sigset_t sc_mask;
|
||||
|
||||
int sc_sp, sc_pc, sc_ps;
|
||||
};
|
@ -73,29 +73,12 @@ static void
|
||||
DEFUN(trampoline, (sig, code, context, addr),
|
||||
int sig AND int code AND struct sigcontext *context AND PTR addr)
|
||||
{
|
||||
register int a0 asm("%a0");
|
||||
register int a1 asm("%a1");
|
||||
register int d0 asm("%d0");
|
||||
register int d1 asm("%d1");
|
||||
|
||||
int savea[2], saved[2];
|
||||
|
||||
double fpsave[16];
|
||||
int fsr;
|
||||
int savefpu;
|
||||
int save[4];
|
||||
|
||||
/* Save the call-clobbered registers. */
|
||||
savea[0] = a0;
|
||||
savea[1] = a1;
|
||||
saved[0] = d0;
|
||||
saved[1] = d1;
|
||||
asm volatile ("movem%.l d0-d1/a0-a1, %0" : : "m" (save[0]));
|
||||
|
||||
#if 0
|
||||
/* Save the FPU regs if the FPU enable bit is set in the PSR,
|
||||
and the signal isn't an FP exception. */
|
||||
savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE;
|
||||
if (savefpu)
|
||||
#endif
|
||||
/* XXX should save/restore FP regs */
|
||||
|
||||
/* Call the user's handler. */
|
||||
(*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
|
||||
@ -103,15 +86,10 @@ DEFUN(trampoline, (sig, code, context, addr),
|
||||
(sig, code, context, addr);
|
||||
|
||||
/* Restore the call-clobbered registers. */
|
||||
a0 = savea[0];
|
||||
a1 = savea[1];
|
||||
d0 = saved[0];
|
||||
d1 = saved[1];
|
||||
asm volatile ("movem%.l %0, d0-d1/a0-a1" : : "g" (save[0]) :
|
||||
"d0", "d1", "a0", "a1");
|
||||
|
||||
#if 0
|
||||
if (savefpu)
|
||||
;
|
||||
#endif
|
||||
__sigreturn (context);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
26
sysdeps/unix/bsd/sun/sigreturn.S
Normal file
26
sysdeps/unix/bsd/sun/sigreturn.S
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 1993 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 Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#ifndef SYS_sigreturn
|
||||
#define SYS_sigreturn 139
|
||||
#endif
|
||||
|
||||
SYSCALL__ (sigreturn, 1)
|
||||
/* Does not return. */
|
Loading…
Reference in New Issue
Block a user