mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-13 00:30:07 +00:00
2006-10-05 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #2749] * sysdeps/powerpc/nofpu/Makefile [subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines. [subdirs-math] (CPPFLAGS): Add -I../soft-fp. [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl. [subdirs-math] (CFLAGS-s_ccoshl.c): Likewise. [subdirs-math] (CFLAGS-s_csinhl.c): Likewise. [subdirs-math] (CFLAGS-s_clogl.c): Likewise. [subdirs-math] (CFLAGS-s_clog10l.c): Likewise. [subdirs-math] (CFLAGS-s_csinl.c): Likewise. [subdirs-math] (CFLAGS-s_csqrtl.c): Likewise. * sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi, __fixtfsi, and __trunctfsf2. (GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2. Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2. * sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp. * sysdeps/powerpc/soft-fp/sfp-machine.h: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S: New file.
This commit is contained in:
parent
d396ccd5ec
commit
3de1043772
@ -1,3 +1,31 @@
|
||||
2006-10-05 Steven Munroe <sjmunroe@us.ibm.com>
|
||||
|
||||
[BZ #2749]
|
||||
* sysdeps/powerpc/nofpu/Makefile
|
||||
[subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines.
|
||||
[subdirs-math] (CPPFLAGS): Add -I../soft-fp.
|
||||
[subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl.
|
||||
[subdirs-math] (CFLAGS-s_ccoshl.c): Likewise.
|
||||
[subdirs-math] (CFLAGS-s_csinhl.c): Likewise.
|
||||
[subdirs-math] (CFLAGS-s_clogl.c): Likewise.
|
||||
[subdirs-math] (CFLAGS-s_clog10l.c): Likewise.
|
||||
[subdirs-math] (CFLAGS-s_csinl.c): Likewise.
|
||||
[subdirs-math] (CFLAGS-s_csqrtl.c): Likewise.
|
||||
* sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi,
|
||||
__fixtfsi, and __trunctfsf2.
|
||||
(GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2.
|
||||
Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2.
|
||||
* sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp.
|
||||
* sysdeps/powerpc/soft-fp/sfp-machine.h: New file.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file.
|
||||
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S:
|
||||
New file.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S:
|
||||
New file.
|
||||
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S:
|
||||
New file.
|
||||
|
||||
2006-01-27 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/nofpu/Subdirs: New file.
|
||||
|
@ -2,9 +2,23 @@
|
||||
|
||||
ifeq ($(subdir),soft-fp)
|
||||
sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
|
||||
$(gcc-quad-routines) sim-full
|
||||
sim-full
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),math)
|
||||
libm-support += fenv_const fe_nomask
|
||||
CPPFLAGS += -I../soft-fp/
|
||||
# The follow CFLAGS are a work around for GCC Bugzilla Bug 29253
|
||||
# "expand_abs wrong default code for floating point"
|
||||
# As this is not a regression, a fix is not likely to go into
|
||||
# gcc-4.1.1 and may be too late for gcc-4.2. So we need these flags
|
||||
# until the fix in a gcc release and glibc drops support for earlier
|
||||
# versions of gcc.
|
||||
CFLAGS-e_powl.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_ccoshl.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_csinhl.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_clogl.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_clog10l.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_csinl.c += -fno-builtin-fabsl
|
||||
CFLAGS-s_csqrtl.c += -fno-builtin-fabsl
|
||||
endif
|
||||
|
@ -3,16 +3,18 @@ libc {
|
||||
__sim_exceptions; __sim_disabled_exceptions; __sim_round_mode;
|
||||
__adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
|
||||
__extendsfdf2; __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
|
||||
__fixtfdi; __fixtfsi;
|
||||
__fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
|
||||
__floatdidf; __floatdisf; __floatsidf; __floatsisf;
|
||||
__gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
|
||||
__negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3;
|
||||
__subsf3; __truncdfsf2; __trunctfsf2;
|
||||
__subsf3; __truncdfsf2;
|
||||
}
|
||||
GLIBC_2.4 {
|
||||
__floatundidf; __floatundisf; __floatunditf;
|
||||
__floatunsidf; __floatunsisf; __floatunsitf;
|
||||
__unorddf2; __unordsf2; __unordtf2;
|
||||
__floatundidf; __floatundisf;
|
||||
__floatunsidf; __floatunsisf;
|
||||
__unorddf2; __unordsf2;
|
||||
__nedf2; __nesf2;
|
||||
__gtdf2; __gtsf2;
|
||||
__ltdf2; __ltsf2;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
63
sysdeps/powerpc/soft-fp/sfp-machine.h
Normal file
63
sysdeps/powerpc/soft-fp/sfp-machine.h
Normal file
@ -0,0 +1,63 @@
|
||||
#define _FP_W_TYPE_SIZE 32
|
||||
#define _FP_W_TYPE unsigned long
|
||||
#define _FP_WS_TYPE signed long
|
||||
#define _FP_I_TYPE long
|
||||
|
||||
#define _FP_MUL_MEAT_S(R,X,Y) \
|
||||
_FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
|
||||
#define _FP_MUL_MEAT_D(R,X,Y) \
|
||||
_FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
|
||||
#define _FP_MUL_MEAT_Q(R,X,Y) \
|
||||
_FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
|
||||
|
||||
#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
|
||||
#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
|
||||
#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
|
||||
|
||||
#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
|
||||
#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
|
||||
#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
|
||||
#define _FP_NANSIGN_S 0
|
||||
#define _FP_NANSIGN_D 0
|
||||
#define _FP_NANSIGN_Q 0
|
||||
|
||||
#define _FP_KEEPNANFRACP 1
|
||||
|
||||
/* Someone please check this. */
|
||||
#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
|
||||
do { \
|
||||
if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
|
||||
&& !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
|
||||
{ \
|
||||
R##_s = Y##_s; \
|
||||
_FP_FRAC_COPY_##wc(R,Y); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
R##_s = X##_s; \
|
||||
_FP_FRAC_COPY_##wc(R,X); \
|
||||
} \
|
||||
R##_c = FP_CLS_NAN; \
|
||||
} while (0)
|
||||
|
||||
/* Exception flags. We use the bit positions of the appropriate bits
|
||||
in the FPSCR, which also correspond to the FE_* bits. This makes
|
||||
everything easier ;-). */
|
||||
#define FP_EX_INVALID (1 << (31 - 2))
|
||||
#define FP_EX_OVERFLOW (1 << (31 - 3))
|
||||
#define FP_EX_UNDERFLOW (1 << (31 - 4))
|
||||
#define FP_EX_DENORM FP_EX_UNDERFLOW
|
||||
#define FP_EX_DIVZERO (1 << (31 - 5))
|
||||
#define FP_EX_INEXACT (1 << (31 - 6))
|
||||
|
||||
#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex)
|
||||
#define FP_ROUNDMODE __sim_round_mode
|
||||
|
||||
extern int __sim_exceptions;
|
||||
libc_hidden_proto (__sim_exceptions);
|
||||
extern int __sim_disabled_exceptions;
|
||||
libc_hidden_proto (__sim_disabled_exceptions);
|
||||
extern int __sim_round_mode;
|
||||
libc_hidden_proto (__sim_round_mode);
|
||||
|
||||
extern void __simulate_exceptions (int x) attribute_hidden;
|
2
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
Normal file
2
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
Normal file
@ -0,0 +1,2 @@
|
||||
powerpc/nofpu
|
||||
powerpc/soft-fp
|
59
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
Normal file
59
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
Normal file
@ -0,0 +1,59 @@
|
||||
/* Save current context.
|
||||
Copyright (C) 2002, 2004, 2005, 2006 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
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <rtld-global-offsets.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#define __ASSEMBLY__
|
||||
#include <asm/ptrace.h>
|
||||
#include "ucontext_i.h"
|
||||
|
||||
#define __CONTEXT_FUNC_NAME __getcontext
|
||||
#undef __CONTEXT_ENABLE_FPRS
|
||||
#undef __CONTEXT_ENABLE_VRS
|
||||
|
||||
#include "getcontext-common.S"
|
||||
|
||||
versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||
|
||||
/* For the nofpu case the old/new versions are the same function. */
|
||||
strong_alias (__getcontext, __novec_getcontext)
|
||||
|
||||
compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3_3)
|
||||
|
||||
#endif
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
|
||||
|
||||
#define _ERRNO_H 1
|
||||
#include <bits/errno.h>
|
||||
|
||||
compat_text_section
|
||||
ENTRY (__getcontext_stub)
|
||||
li r3,ENOSYS
|
||||
b __syscall_error@local
|
||||
END (__getcontext_stub)
|
||||
.previous
|
||||
|
||||
compat_symbol (libc, __getcontext_stub, getcontext, GLIBC_2_1)
|
||||
|
||||
#endif
|
59
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
Normal file
59
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
Normal file
@ -0,0 +1,59 @@
|
||||
/* Jump to a new context.
|
||||
Copyright (C) 2002, 2004, 2005, 2006 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
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <rtld-global-offsets.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#define __ASSEMBLY__
|
||||
#include <asm/ptrace.h>
|
||||
#include "ucontext_i.h"
|
||||
|
||||
#define __CONTEXT_FUNC_NAME __setcontext
|
||||
#undef __CONTEXT_ENABLE_FPRS
|
||||
#undef __CONTEXT_ENABLE_VRS
|
||||
|
||||
#include "setcontext-common.S"
|
||||
|
||||
versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4)
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||
|
||||
/* For the nofpu case the old/new versions are the same function. */
|
||||
strong_alias (__setcontext, __novec_setcontext)
|
||||
|
||||
compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3)
|
||||
|
||||
#endif
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_3)
|
||||
|
||||
#define _ERRNO_H 1
|
||||
#include <bits/errno.h>
|
||||
|
||||
compat_text_section
|
||||
ENTRY (__setcontext_stub)
|
||||
li r3,ENOSYS
|
||||
b __syscall_error@local
|
||||
END (__setcontext_stub)
|
||||
.previous
|
||||
|
||||
compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_0)
|
||||
|
||||
#endif
|
@ -0,0 +1,59 @@
|
||||
/* Save current context and jump to a new context.
|
||||
Copyright (C) 2002, 2004, 2005, 2006 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
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <rtld-global-offsets.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#define __ASSEMBLY__
|
||||
#include <asm/ptrace.h>
|
||||
#include "ucontext_i.h"
|
||||
|
||||
#define __CONTEXT_FUNC_NAME __swapcontext
|
||||
#undef __CONTEXT_ENABLE_FPRS
|
||||
#undef __CONTEXT_ENABLE_VRS
|
||||
|
||||
# include "swapcontext-common.S"
|
||||
|
||||
versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4)
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||
|
||||
/* For the nofpu case the old/new versions are the same function. */
|
||||
strong_alias (__swapcontext, __novec_swapcontext)
|
||||
|
||||
compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3_3)
|
||||
|
||||
#endif
|
||||
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
|
||||
|
||||
#define _ERRNO_H 1
|
||||
#include <bits/errno.h>
|
||||
|
||||
compat_text_section
|
||||
ENTRY (__swapcontext_stub)
|
||||
li r3,ENOSYS
|
||||
b __syscall_error@local
|
||||
END (__swapcontext_stub)
|
||||
.previous
|
||||
|
||||
compat_symbol (libc, __swapcontext_stub, swapcontext, GLIBC_2_1)
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user