#include <cstdint>
#include <softfloat.hpp>
Go to the source code of this file.
◆ ___fixdfti()
Definition at line 16 of file fixdfti.c.
16 {
18 const fixint_t fixint_min = -fixint_max - 1;
19
25
26
27 if (exponent < 0)
28 return 0;
29
30
31 if ((
unsigned)exponent >=
sizeof(
fixint_t) * CHAR_BIT)
32 return sign == 1 ? fixint_max : fixint_min;
33
34
35
38 else
40
41}
unsigned __int128 fixuint_t
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ ___fixsfti()
Definition at line 16 of file fixsfti.c.
16 {
18 const fixint_t fixint_min = -fixint_max - 1;
19
25
26
27 if (exponent < 0)
28 return 0;
29
30
31 if ((
unsigned)exponent >=
sizeof(
fixint_t) * CHAR_BIT)
32 return sign == 1 ? fixint_max : fixint_min;
33
34
35
38 else
40}
◆ ___fixtfti()
Definition at line 13 of file fixtfti.c.
13 {
14 const __int128 fixint_max = (__int128)((~(unsigned __int128)0) / 2);
15 const __int128 fixint_min = -fixint_max - 1;
16
17 const __int128 aRep = toRep(
a);
18 const __int128 aAbs = aRep &
absMask;
19 const __int128 sign = aRep &
signBit ? -1 : 1;
22
23
24 if (exponent < 0)
25 return 0;
26
27
28 if ((unsigned)exponent >= sizeof(__int128) * CHAR_BIT)
29 return sign == 1 ? fixint_max : fixint_min;
30
31
32
35 else
37}
◆ ___fixunsdfti()
unsigned __int128 ___fixunsdfti |
( |
uint64_t | a | ) |
|
Definition at line 15 of file fixunsdfti.c.
15 {
16
19 const int sign = aRep &
signBit ? -1 : 1;
22
23
24 if (sign == -1 || exponent < 0)
25 return 0;
26
27
28 if ((
unsigned)exponent >=
sizeof(
fixuint_t) * CHAR_BIT)
30
31
32
35 else
37}
◆ ___fixunssfti()
unsigned __int128 ___fixunssfti |
( |
uint32_t | a | ) |
|
Definition at line 19 of file fixunssfti.c.
19 {
20
23 const int sign = aRep &
signBit ? -1 : 1;
26
27
28 if (sign == -1 || exponent < 0)
29 return 0;
30
31
32 if ((
unsigned)exponent >=
sizeof(
fixuint_t) * CHAR_BIT)
34
35
36
39 else
41}
◆ ___fixunstfti()
Definition at line 18 of file fixunstfti.c.
18 {
19
20 const rep_t aRep = toRep(
a);
22 const int sign = aRep &
signBit ? -1 : 1;
25
26
27 if (sign == -1 || exponent < 0)
28 return 0;
29
30
31 if ((
unsigned)exponent >=
sizeof(
fixuint_t) * CHAR_BIT)
33
34
35
38 else
40}
◆ ___floattidf()
double ___floattidf |
( |
__int128 | a | ) |
|
Definition at line 26 of file floattidf.c.
27{
29 return 0.0;
30 const unsigned N =
sizeof(
ti_int) * CHAR_BIT;
34 int e = sd - 1;
35 if (sd > DBL_MANT_DIG)
36 {
37
38
39
40
41
42
43
44
45 switch (sd)
46 {
47 case DBL_MANT_DIG + 1:
49 break;
50 case DBL_MANT_DIG + 2:
51 break;
52 default:
53 a = ((
tu_int)
a >> (sd - (DBL_MANT_DIG+2))) |
54 ((
a & ((
tu_int)(-1) >> ((
N + DBL_MANT_DIG+2) - sd))) != 0);
55 };
56
60
61 if (
a & ((
tu_int)1 << DBL_MANT_DIG))
62 {
64 ++e;
65 }
66
67 }
68 else
69 {
70 a <<= (DBL_MANT_DIG - sd);
71
72 }
75 ((e + 1023) << 20) |
79}
__int128 __clzti2(__int128 a)
◆ ___floatuntidf()
double ___floatuntidf |
( |
unsigned | __int128 | ) |
|