From 0899b8897c1bcec464c0e220dd118f293bab05eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Feb 2009 01:01:39 +0000 Subject: * sysdeps/sh/sh4/dl-trampoline.S: Only set HAVE_FPU if __SH_FPU_ANY__ is set. * sysdeps/sh/sh4/setjmp.S: Support SH4-NOFPU. * sysdeps/sh/sh4/__longjmp.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Likewise. --- sysdeps/sh/sh4/__longjmp.S | 7 ++++++- sysdeps/sh/sh4/dl-trampoline.S | 4 +++- sysdeps/sh/sh4/setjmp.S | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'sysdeps/sh') diff --git a/sysdeps/sh/sh4/__longjmp.S b/sysdeps/sh/sh4/__longjmp.S index 320a7d1..2fd137b 100644 --- a/sysdeps/sh/sh4/__longjmp.S +++ b/sysdeps/sh/sh4/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for SH. - Copyright (C) 1999, 2000, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2005, 2006, 2009 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 @@ -52,6 +52,7 @@ ENTRY (__longjmp) mov.l @r4+, r15 lds.l @r4+, pr #endif +#ifdef __SH_FPU_ANY__ ldc.l @r4+, gbr lds.l @r4+, fpscr fmov.s @r4+, fr12 @@ -59,4 +60,8 @@ ENTRY (__longjmp) fmov.s @r4+, fr14 rts fmov.s @r4+, fr15 +#else + rts + ldc.l @r4+, gbr +#endif /* !__SH_FPU_ANY__ */ END (__longjmp) diff --git a/sysdeps/sh/sh4/dl-trampoline.S b/sysdeps/sh/sh4/dl-trampoline.S index f952985..bd9bb7e 100644 --- a/sysdeps/sh/sh4/dl-trampoline.S +++ b/sysdeps/sh/sh4/dl-trampoline.S @@ -1,2 +1,4 @@ -#define HAVE_FPU +#ifdef __SH_FPU_ANY__ +# define HAVE_FPU +#endif #include diff --git a/sysdeps/sh/sh4/setjmp.S b/sysdeps/sh/sh4/setjmp.S index f9a4f0a..03f0b08 100644 --- a/sysdeps/sh/sh4/setjmp.S +++ b/sysdeps/sh/sh4/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for SH4. - Copyright (C) 1999, 2000, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2005, 2006, 2009 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 @@ -23,11 +23,13 @@ ENTRY (__sigsetjmp) /* Save registers */ add #JB_SIZE, r4 +#ifdef __SH_FPU_ANY__ fmov.s fr15, @-r4 fmov.s fr14, @-r4 fmov.s fr13, @-r4 fmov.s fr12, @-r4 sts.l fpscr, @-r4 +#endif /* __SH_FPU_ANY__ */ stc.l gbr, @-r4 #ifdef PTR_MANGLE sts pr, r2 -- cgit v1.1