* 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.
This commit is contained in:
Ulrich Drepper 2009-02-05 01:01:39 +00:00
parent 22cc3f7580
commit 0899b8897c
8 changed files with 50 additions and 20 deletions

View File

@ -1,3 +1,14 @@
2009-02-03 Andrew Stubbs <ams@codesourcery.com>
* 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.
2009-02-04 Ulrich Drepper <drepper@redhat.com> 2009-02-04 Ulrich Drepper <drepper@redhat.com>
* po/ru.po: Update from translation team. * po/ru.po: Update from translation team.

View File

@ -1,5 +1,5 @@
/* longjmp for SH. /* 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. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -52,6 +52,7 @@ ENTRY (__longjmp)
mov.l @r4+, r15 mov.l @r4+, r15
lds.l @r4+, pr lds.l @r4+, pr
#endif #endif
#ifdef __SH_FPU_ANY__
ldc.l @r4+, gbr ldc.l @r4+, gbr
lds.l @r4+, fpscr lds.l @r4+, fpscr
fmov.s @r4+, fr12 fmov.s @r4+, fr12
@ -59,4 +60,8 @@ ENTRY (__longjmp)
fmov.s @r4+, fr14 fmov.s @r4+, fr14
rts rts
fmov.s @r4+, fr15 fmov.s @r4+, fr15
#else
rts
ldc.l @r4+, gbr
#endif /* !__SH_FPU_ANY__ */
END (__longjmp) END (__longjmp)

View File

@ -1,2 +1,4 @@
#ifdef __SH_FPU_ANY__
# define HAVE_FPU # define HAVE_FPU
#endif
#include <sysdeps/sh/dl-trampoline.S> #include <sysdeps/sh/dl-trampoline.S>

View File

@ -1,5 +1,5 @@
/* setjmp for SH4. /* 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. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -23,11 +23,13 @@
ENTRY (__sigsetjmp) ENTRY (__sigsetjmp)
/* Save registers */ /* Save registers */
add #JB_SIZE, r4 add #JB_SIZE, r4
#ifdef __SH_FPU_ANY__
fmov.s fr15, @-r4 fmov.s fr15, @-r4
fmov.s fr14, @-r4 fmov.s fr14, @-r4
fmov.s fr13, @-r4 fmov.s fr13, @-r4
fmov.s fr12, @-r4 fmov.s fr12, @-r4
sts.l fpscr, @-r4 sts.l fpscr, @-r4
#endif /* __SH_FPU_ANY__ */
stc.l gbr, @-r4 stc.l gbr, @-r4
#ifdef PTR_MANGLE #ifdef PTR_MANGLE
sts pr, r2 sts pr, r2

View File

@ -1,5 +1,5 @@
/* Save current context. /* Save current context.
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -61,6 +61,7 @@ ENTRY(__getcontext)
mov.l r9, @-r0 mov.l r9, @-r0
mov.l r8, @-r0 mov.l r8, @-r0
#ifdef __SH_FPU_ANY__
mov r4, r0 mov r4, r0
/* We need 2 add instruction because oFPUL+4 > 127. */ /* We need 2 add instruction because oFPUL+4 > 127. */
add #124,r0 add #124,r0
@ -101,6 +102,7 @@ ENTRY(__getcontext)
fmov.s fr2, @-r0 fmov.s fr2, @-r0
fmov.s fr1, @-r0 fmov.s fr1, @-r0
fmov.s fr0, @-r0 fmov.s fr0, @-r0
#endif /* __SH_FPU_ANY__ */
/* sigprocmask (SIG_BLOCK, NULL, &uc->uc_sigmask). */ /* sigprocmask (SIG_BLOCK, NULL, &uc->uc_sigmask). */
mov r4, r6 mov r4, r6

View File

@ -1,5 +1,5 @@
/* Dump registers. /* Dump registers.
Copyright (C) 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -144,6 +144,7 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_STRING ("\n"); ADD_STRING ("\n");
#ifdef __SH_FPU_ANY__
if (ctx->sc_ownedfp != NULL) if (ctx->sc_ownedfp != NULL)
{ {
hexvalue (ctx->sc_fpregs[0], fpregs[0], 8); hexvalue (ctx->sc_fpregs[0], fpregs[0], 8);
@ -253,6 +254,7 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_STRING ("\n"); ADD_STRING ("\n");
} }
#endif /* __SH_FPU_ANY__ */
/* Write the stuff out. */ /* Write the stuff out. */
writev (fd, iov, nr); writev (fd, iov, nr);

View File

@ -1,5 +1,5 @@
/* Install given context. /* Install given context.
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -50,6 +50,7 @@ ENTRY(__setcontext)
nop nop
.Lsetcontext_restore: .Lsetcontext_restore:
#ifdef __SH_FPU_ANY__
mov r8, r0 mov r8, r0
add #(oFR0),r0 add #(oFR0),r0
fmov.s @r0+, fr0 fmov.s @r0+, fr0
@ -88,6 +89,7 @@ ENTRY(__setcontext)
frchg frchg
lds.l @r0+, fpscr lds.l @r0+, fpscr
lds.l @r0+, fpul lds.l @r0+, fpul
#endif /* __SH_FPU_ANY__ */
mov r8, r0 mov r8, r0
add #(oPC), r0 add #(oPC), r0

View File

@ -1,5 +1,5 @@
/* Save current context and install the given one. /* Save current context and install the given one.
Copyright (C) 2005 Free Software Foundation, Inc. Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -61,6 +61,7 @@ ENTRY(__swapcontext)
mov.l r9, @-r0 mov.l r9, @-r0
mov.l r8, @-r0 mov.l r8, @-r0
#ifdef __SH_FPU_ANY__
mov r4, r0 mov r4, r0
/* We need 2 add instruction because oFPUL+4 >= 127. */ /* We need 2 add instruction because oFPUL+4 >= 127. */
add #124,r0 add #124,r0
@ -101,6 +102,7 @@ ENTRY(__swapcontext)
fmov.s fr2, @-r0 fmov.s fr2, @-r0
fmov.s fr1, @-r0 fmov.s fr1, @-r0
fmov.s fr0, @-r0 fmov.s fr0, @-r0
#endif /* __SH_FPU_ANY__ */
mov r5, r8 mov r5, r8
@ -125,6 +127,7 @@ ENTRY(__swapcontext)
rts rts
nop nop
.Lswapcontext_restore: .Lswapcontext_restore:
#ifdef __SH_FPU_ANY__
mov r8, r0 mov r8, r0
add #(oFR0),r0 add #(oFR0),r0
fmov.s @r0+, fr0 fmov.s @r0+, fr0
@ -163,6 +166,7 @@ ENTRY(__swapcontext)
frchg frchg
lds.l @r0+, fpscr lds.l @r0+, fpscr
lds.l @r0+, fpul lds.l @r0+, fpul
#endif /* __SH_FPU_ANY__ */
mov r8, r0 mov r8, r0
add #(oPC), r0 add #(oPC), r0