From 1a8aaf919dfdacf7fd31be9cb36cad8cb9875f0f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Oct 2002 23:16:26 +0000 Subject: Update. 2002-10-08 Richard Henderson * soft-fp/op-4.h: Handle carry correctly in __FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3, __FP_FRAC_SUB_4, __FP_FRAC_DEC_3, __FP_FRAC_DEC_4. * soft-fp/op-common.h: New macros _FP_DIV_MEAT_N_loop. 2002-10-08 Aldy Hernandez * configure.in: Compute completely-soft. * config.make.in: Make completely-soft available to sub-makes. * sysdeps/powerpc/soft-fp/Makefile: Add gcc-single-routines and gcc-double-routines. Add sim-full.c. Add fenv_const and fe_nomask to libm-support. * sysdeps/powerpc/soft-fp/sim-full.c: New file. * sysdeps/powerpc/soft-fp/fraiseexcpt.c: New file. * sysdeps/powerpc/soft-fp/fegetexcept.c: New file. * sysdeps/powerpc/soft-fp/fclrexcpt.c: New file. * sysdeps/powerpc/soft-fp/ftestexcept.c: New file. * sysdeps/powerpc/soft-fp/fgetexcptflg.c: New file. * sysdeps/powerpc/soft-fp/fsetexcptflg.c: New file. * sysdeps/powerpc/soft-fp/fedisblxcpt.c: New file. * sysdeps/powerpc/soft-fp/feenablxcpt.c: New file. * sysdeps/powerpc/soft-fp/fegetenv.c: New file. * sysdeps/powerpc/soft-fp/fesetenv.c: New file. * sysdeps/powerpc/soft-fp/fegetround.c: New file. * sysdeps/powerpc/soft-fp/fesetround.c: New file. * sysdeps/powerpc/soft-fp/feupdateenv.c: New file. * sysdeps/powerpc/soft-fp/feholdexcpt.c: New file. * sysdeps/powerpc/soft-fp/fenv_const.c: New file. * sysdeps/powerpc/soft-fp/libm-test-ulps: New file. * sysdeps/powerpc/soft-fp/Versions: Add libgcc soft-float symbols. Add __sim_disabled_exceptions, __sim_exceptions, __sim_round_mode. * sysdeps/powerpc/soft-float/Dist: Add sim-full.c, fenv_const.c. * sysdeps/powerpc/soft-float/sfp-machine.h: Define FP_HANDLE_EXCEPTIONS. Define FP_ROUNDMODE. Redefine FP_* macros to correspond to the FE_* bit positions. Define FP_DIV_MEAT_S to _FP_DIV_MEAT_1_loop. Define externs for __sim_exceptions, __sim_disabled_exceptions, __sim_round_mode, __simulate_exceptions. * sysdeps/powerpc/fpu/bits/fenv.h: Move file from here... * sysdeps/powerpc/bits/fenv.h: ...to here. 2002-10-06 Jakub Jelinek * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela): Store R_PPC_UADDR32 and R_PPC_UADDR16 one byte at a time. Use __builtin_expect for R_PPC_ADDR24 overflow check. Fix R_PPC_ADDR16, R_PPC_UADDR16 and R_PPC_ADDR14* overflow check, use __builtin_expect. --- sysdeps/powerpc/soft-fp/fesetround.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysdeps/powerpc/soft-fp/fesetround.c (limited to 'sysdeps/powerpc/soft-fp/fesetround.c') diff --git a/sysdeps/powerpc/soft-fp/fesetround.c b/sysdeps/powerpc/soft-fp/fesetround.c new file mode 100644 index 0000000000..842614a974 --- /dev/null +++ b/sysdeps/powerpc/soft-fp/fesetround.c @@ -0,0 +1,33 @@ +/* Set rounding mode (soft-float edition). + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Aldy Hernandez , 2002. + 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 "soft-fp.h" +#include "soft-supp.h" + +int +fesetround (int round) +{ + if ((unsigned int) round > FE_DOWNWARD) + return 1; + + __sim_round_mode = round; + + return 0; +} -- cgit 1.4.1