X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libdecnumber%2FdecRound.c;h=26740bf69c2ad0130c14787c186bcb4e5d694db7;hp=0a85cb136a72ecd5a655a4ad58e75b370d0a0ec4;hb=67da83cb6a7c3a20581e4a8f424bb89c504e4cd3;hpb=f98cf5a9caa90ed694c6cd1a4c743a3ccf1810f5 diff --git a/libdecnumber/decRound.c b/libdecnumber/decRound.c index 0a85cb136a7..26740bf69c2 100644 --- a/libdecnumber/decRound.c +++ b/libdecnumber/decRound.c @@ -1,25 +1,39 @@ -/* Temporary support for a libc-like fp environment for decimal float. - Copyright (C) 2005 Free Software Foundation, Inc. +/* Internal testing support for rounding for decimal float. -This file is part of GCC. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. + This file is part of GCC. -GCC 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 General Public License -for more details. + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301, USA. */ + In addition to the permissions in the GNU General Public License, + the Free Software Foundation gives you unlimited permission to link + the compiled version of this file into combinations with other + programs, and to distribute those combinations without any + restriction coming from the use of this file. (The General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into a combine executable.) -#include "config.h" + GCC 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 General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include "dconfig.h" #include "decContext.h" +#include "decRound.h" + +/* Internal, non-documented functions for testing libgcc functions. + This support is not sufficient for application use. */ #define FE_DEC_DOWNWARD 0 #define FE_DEC_TONEAREST 1 @@ -28,11 +42,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #define FE_DEC_UPWARD 4 #define FE_DEC_MAX 5 -extern void __dfp_set_round (int); -extern int __dfp_get_round (void); -extern enum rounding __decGetRound (void); - -/* FIXME: these should be in thread-local storage for runtime support. */ static enum rounding __dfp_rounding_mode = DEC_ROUND_HALF_EVEN; /* Set the decNumber rounding mode from the FE_DEC_* value in MODE. */