mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
[BZ #9726]
2009-01-11 Ryan S. Arnold <rsa@us.ibm.com> [BZ #9726] * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_SET_DI_FPSCR, _SET_SI_FPSCR): Clobber fp0 to prevent erroneous test-case passes. 2009-01-08 Ryan S. Arnold <rsa@us.ibm.com> [BZ #9726] * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S (__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S (__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0.
This commit is contained in:
parent
a3bd28468c
commit
b7219e53bc
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2009-01-11 Ryan S. Arnold <rsa@us.ibm.com>
|
||||
|
||||
[BZ #9726]
|
||||
* sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_SET_DI_FPSCR,
|
||||
_SET_SI_FPSCR): Clobber fp0 to prevent erroneous test-case passes.
|
||||
|
||||
2009-01-08 Ryan S. Arnold <rsa@us.ibm.com>
|
||||
|
||||
[BZ #9726]
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
|
||||
(__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
|
||||
(__CONTEXT_FUNC_NAME): Fix mtfsf to use fp31 instead of fp0.
|
||||
|
||||
2009-01-11 Thomas Schwinge <tschwinge@gnu.org>
|
||||
|
||||
* sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Use
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001,2002,2004,2006,2007,2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001,2002,2004,2006-2008,2009 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ryan S. Arnold <rsa@us.ibm.com>
|
||||
Sean Curry <spcurry@us.ibm.com>
|
||||
@ -104,12 +104,16 @@ typedef unsigned int si_fpscr_t __attribute__ ((__mode__ (__SI__)));
|
||||
(__fpscr)=tmp.fpscr; \
|
||||
tmp.fpscr; })
|
||||
|
||||
/* We make sure to zero fp0 after we use it in order to prevent stale data
|
||||
in an fp register from making a test-case pass erroneously. */
|
||||
# define _SET_DI_FPSCR(__fpscr) { \
|
||||
union { double d; di_fpscr_t fpscr; } \
|
||||
tmp __attribute__ ((__aligned__(8))); \
|
||||
tmp.fpscr = __fpscr; \
|
||||
/* Set the entire 64-bit FPSCR. */ \
|
||||
__asm__ ("lfd%U0 0,%0; mtfsf 255,0,1,0" : : "m" (tmp.d) : "fr0"); \
|
||||
tmp.d = 0; \
|
||||
__asm__("lfd%U0 0,%0" : : "m" (tmp.d) : "fr0"); \
|
||||
}
|
||||
|
||||
# define _GET_SI_FPSCR(__fpscr) ({ \
|
||||
@ -120,6 +124,8 @@ typedef unsigned int si_fpscr_t __attribute__ ((__mode__ (__SI__)));
|
||||
(__fpscr)=tmp.cw[1]; \
|
||||
tmp.cw[0]; })
|
||||
|
||||
/* We make sure to zero fp0 after we use it in order to prevent stale data
|
||||
in an fp register from making a test-case pass erroneously. */
|
||||
# define _SET_SI_FPSCR(__fpscr) { \
|
||||
union { double d; si_fpscr_t fpscr[2]; } \
|
||||
tmp __attribute__ ((__aligned__(8))); \
|
||||
@ -127,6 +133,8 @@ typedef unsigned int si_fpscr_t __attribute__ ((__mode__ (__SI__)));
|
||||
tmp.fpscr[0] = 0xFFF80000; \
|
||||
tmp.fpscr[1] = __fpscr; \
|
||||
__asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
|
||||
tmp.d = 0; \
|
||||
__asm__("lfd%U0 0,%0" : : "m" (tmp.d) : "fr0"); \
|
||||
}
|
||||
|
||||
void prime_special_regs(int which)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Jump to a new context powerpc32 common.
|
||||
Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2008, 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
|
||||
@ -202,7 +202,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
lfd fp0,_UC_FREGS+(0*8)(r31)
|
||||
# ifdef _ARCH_PWR6
|
||||
/* Use the extended four-operand version of the mtfsf insn. */
|
||||
mtfsf 0xff,fp0,1,0
|
||||
mtfsf 0xff,fp31,1,0
|
||||
# else
|
||||
/* Availability of DFP indicates a 64-bit FPSCR. */
|
||||
andi. r6,r7,PPC_FEATURE_HAS_DFP
|
||||
@ -304,4 +304,3 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
/* NOTREACHED */
|
||||
|
||||
END (__CONTEXT_FUNC_NAME)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Save current context and jump to a new context.
|
||||
Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2008, 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
|
||||
@ -428,7 +428,7 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
lfd fp0,_UC_FREGS+(0*8)(r31)
|
||||
# ifdef _ARCH_PWR6
|
||||
/* Use the extended four-operand version of the mtfsf insn. */
|
||||
mtfsf 0xff,fp0,1,0
|
||||
mtfsf 0xff,fp31,1,0
|
||||
# else
|
||||
/* Availability of DFP indicates a 64-bit FPSCR. */
|
||||
andi. r6,r7,PPC_FEATURE_HAS_DFP
|
||||
@ -528,4 +528,3 @@ ENTRY(__CONTEXT_FUNC_NAME)
|
||||
/* NOTREACHED */
|
||||
|
||||
END(__CONTEXT_FUNC_NAME)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user