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/unix/sysv/linux/sh/sh4/swapcontext.S | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S') diff --git a/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S b/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S index 1aeca1b1a7..1f1b69baee 100644 --- a/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S +++ b/sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S @@ -1,5 +1,5 @@ /* 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. 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 r8, @-r0 +#ifdef __SH_FPU_ANY__ mov r4, r0 /* We need 2 add instruction because oFPUL+4 >= 127. */ add #124,r0 @@ -101,6 +102,7 @@ ENTRY(__swapcontext) fmov.s fr2, @-r0 fmov.s fr1, @-r0 fmov.s fr0, @-r0 +#endif /* __SH_FPU_ANY__ */ mov r5, r8 @@ -119,12 +121,13 @@ ENTRY(__swapcontext) not r1, r1 // r1=0 means r0 = -1 to -4095 tst r1, r1 // i.e. error in linux bf .Lswapcontext_restore -.Lsyscall_error: +.Lsyscall_error: SYSCALL_ERROR_HANDLER .Lpseudo_end: rts nop -.Lswapcontext_restore: +.Lswapcontext_restore: +#ifdef __SH_FPU_ANY__ mov r8, r0 add #(oFR0),r0 fmov.s @r0+, fr0 @@ -163,6 +166,7 @@ ENTRY(__swapcontext) frchg lds.l @r0+, fpscr lds.l @r0+, fpul +#endif /* __SH_FPU_ANY__ */ mov r8, r0 add #(oPC), r0 @@ -208,7 +212,7 @@ ENTRY(__swapcontext) mov.l @r15+, r0 jmp @r0 mov.l @r15+, r0 - + PSEUDO_END(__swapcontext) weak_alias (__swapcontext, swapcontext) -- cgit 1.4.1