From 75ab5314ea5afee291baaca0fa3a5d309cd0c6a6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Dec 1994 18:00:25 +0000 Subject: [PATCH] Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save. --- sysdeps/mips/setjmp_aux.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c index 3a3ed208c1..3d0ea14352 100644 --- a/sysdeps/mips/setjmp_aux.c +++ b/sysdeps/mips/setjmp_aux.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1994 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@zen.org). The GNU C Library is free software; you can redistribute it and/or @@ -16,20 +16,15 @@ 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 #include -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - /* This function is only called via the assembly language routine __setjmp, which arranges to pass in the stack pointer and the frame pointer. We do things this way because it's difficult to reliably access them in C. */ int -DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp) +__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp) { /* Store the floating point callee-saved registers... */ asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0])); @@ -62,8 +57,10 @@ DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp) asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7])); /* .. and finally get and reconstruct the floating point csr. */ - asm volatile ("cfc1 $2, $31"); - asm volatile ("sw $2, %0" : : "m" (env[0].__fpc_csr)); + asm ("cfc1 %0, $31" : "=r" (env[0].__fpc_csr)); + + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); return 0; }