1 /* Temporary library support for decimal floating point.
2 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 In addition to the permissions in the GNU General Public License, the
12 Free Software Foundation gives you unlimited permission to link the
13 compiled version of this file into combinations with other programs,
14 and to distribute those combinations without any restriction coming
15 from the use of this file. (The General Public License restrictions
16 do apply in other respects; for example, they cover modification of
17 the file, and distribution when not linked into a combine
20 GCC is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23 License for more details.
25 You should have received a copy of the GNU General Public License
26 along with GCC; see the file COPYING. If not, write to the Free
27 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
32 #include "decContext.h"
33 #include "decExcept.h"
35 /* Internal, non-documented functions for testing libgcc functions.
36 This support is not sufficient for real use. */
38 static int __dfp_except_flags = 0;
40 /* Clear the dummy exception flags. */
42 __dfp_clear_except (void)
44 __dfp_except_flags = 0;
47 /* Return the dummy exception flags corresponding to the mask. */
49 __dfp_test_except (int mask)
51 return __dfp_except_flags & mask;
54 /* Set dummy exception flags. */
56 __dfp_raise_except (int flags)
58 __dfp_except_flags |= flags;