1 /* Copyright (C) 2007 Free Software Foundation, Inc.
3 This file is part of GCC.
5 GCC is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
10 In addition to the permissions in the GNU General Public License, the
11 Free Software Foundation gives you unlimited permission to link the
12 compiled version of this file into combinations with other programs,
13 and to distribute those combinations without any restriction coming
14 from the use of this file. (The General Public License restrictions
15 do apply in other respects; for example, they cover modification of
16 the file, and distribution when not linked into a combine
19 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
20 WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 You should have received a copy of the GNU General Public License
25 along with GCC; see the file COPYING. If not, write to the Free
26 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
29 #include "bid_internal.h"
31 #define SIZE_MASK 0xffff8000
32 #define INVALID_RESULT 0x8000
34 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_rnint
, UINT128
, x
,
35 bid128_to_int32_rnint
, int, SIZE_MASK
,
38 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_xrnint
, UINT128
,
39 x
, bid128_to_int32_xrnint
, int,
40 SIZE_MASK
, INVALID_RESULT
)
42 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_rninta
, UINT128
,
43 x
, bid128_to_int32_rninta
, int,
44 SIZE_MASK
, INVALID_RESULT
)
46 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_xrninta
, UINT128
,
47 x
, bid128_to_int32_xrninta
, int,
48 SIZE_MASK
, INVALID_RESULT
)
50 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_int
, UINT128
, x
,
51 bid128_to_int32_int
, int, SIZE_MASK
,
54 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_xint
, UINT128
, x
,
55 bid128_to_int32_xint
, int, SIZE_MASK
,
58 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_floor
, UINT128
, x
,
59 bid128_to_int32_floor
, int, SIZE_MASK
,
62 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_ceil
, UINT128
, x
,
63 bid128_to_int32_ceil
, int, SIZE_MASK
,
66 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_xfloor
, UINT128
,
67 x
, bid128_to_int32_xfloor
, int,
68 SIZE_MASK
, INVALID_RESULT
)
70 BID_TO_SMALL_INT_CVT_FUNCTION (short, bid128_to_int16_xceil
, UINT128
, x
,
71 bid128_to_int32_xceil
, int, SIZE_MASK
,