Home
last modified time | relevance | path

Searched refs:xm (Results 1 – 25 of 47) sorted by relevance

12

/Linux-v5.4/arch/mips/math-emu/
Dieee754dp.c56 static u64 ieee754dp_get_rounding(int sn, u64 xm) in ieee754dp_get_rounding() argument
60 if (xm & (DP_MBIT(3) - 1)) { in ieee754dp_get_rounding()
65 xm += 0x3 + ((xm >> 3) & 1); in ieee754dp_get_rounding()
70 xm += 0x8; in ieee754dp_get_rounding()
74 xm += 0x8; in ieee754dp_get_rounding()
78 return xm; in ieee754dp_get_rounding()
87 union ieee754dp ieee754dp_format(int sn, int xe, u64 xm) in ieee754dp_format() argument
89 assert(xm); /* we don't gen exact zeros (probably should) */ in ieee754dp_format()
91 assert((xm >> (DP_FBITS + 1 + 3)) == 0); /* no excess */ in ieee754dp_format()
92 assert(xm & (DP_HIDDEN_BIT << 3)); in ieee754dp_format()
[all …]
Dieee754sp.c56 static unsigned int ieee754sp_get_rounding(int sn, unsigned int xm) in ieee754sp_get_rounding() argument
60 if (xm & (SP_MBIT(3) - 1)) { in ieee754sp_get_rounding()
65 xm += 0x3 + ((xm >> 3) & 1); in ieee754sp_get_rounding()
70 xm += 0x8; in ieee754sp_get_rounding()
74 xm += 0x8; in ieee754sp_get_rounding()
78 return xm; in ieee754sp_get_rounding()
87 union ieee754sp ieee754sp_format(int sn, int xe, unsigned int xm) in ieee754sp_format() argument
89 assert(xm); /* we don't gen exact zeros (probably should) */ in ieee754sp_format()
91 assert((xm >> (SP_FBITS + 1 + 3)) == 0); /* no excess */ in ieee754sp_format()
92 assert(xm & (SP_HIDDEN_BIT << 3)); in ieee754sp_format()
[all …]
Ddp_tint.c51 xm <<= xe - DP_FBITS; in ieee754dp_tint()
54 residue = xm; in ieee754dp_tint()
57 xm = 0; in ieee754dp_tint()
59 residue = xm << (64 - DP_FBITS + xe); in ieee754dp_tint()
62 xm >>= DP_FBITS - xe; in ieee754dp_tint()
66 odd = (xm & 0x1) != 0x0; in ieee754dp_tint()
70 xm++; in ieee754dp_tint()
76 xm++; in ieee754dp_tint()
80 xm++; in ieee754dp_tint()
84 if ((xm >> 31) != 0 && (xs == 0 || xm != 0x80000000)) { in ieee754dp_tint()
[all …]
Ddp_tlong.c45 if (xe == 63 && xs && xm == DP_HIDDEN_BIT) in ieee754dp_tlong()
54 xm <<= xe - DP_FBITS; in ieee754dp_tlong()
57 residue = xm; in ieee754dp_tlong()
60 xm = 0; in ieee754dp_tlong()
65 residue = xm << (xe + 1); in ieee754dp_tlong()
69 xm >>= DP_FBITS - xe; in ieee754dp_tlong()
71 odd = (xm & 0x1) != 0x0; in ieee754dp_tlong()
75 xm++; in ieee754dp_tlong()
81 xm++; in ieee754dp_tlong()
85 xm++; in ieee754dp_tlong()
[all …]
Dsp_tint.c45 if (xe == 31 && xs && xm == SP_HIDDEN_BIT) in ieee754sp_tint()
54 xm <<= xe - SP_FBITS; in ieee754sp_tint()
57 residue = xm; in ieee754sp_tint()
60 xm = 0; in ieee754sp_tint()
65 residue = xm << (xe + 1); in ieee754sp_tint()
69 xm >>= SP_FBITS - xe; in ieee754sp_tint()
71 odd = (xm & 0x1) != 0x0; in ieee754sp_tint()
75 xm++; in ieee754sp_tint()
81 xm++; in ieee754sp_tint()
85 xm++; in ieee754sp_tint()
[all …]
Dsp_tlong.c45 if (xe == 63 && xs && xm == SP_HIDDEN_BIT) in ieee754sp_tlong()
54 xm <<= xe - SP_FBITS; in ieee754sp_tlong()
57 residue = xm; in ieee754sp_tlong()
60 xm = 0; in ieee754sp_tlong()
62 residue = xm << (32 - SP_FBITS + xe); in ieee754sp_tlong()
65 xm >>= SP_FBITS - xe; in ieee754sp_tlong()
67 odd = (xm & 0x1) != 0x0; in ieee754sp_tlong()
71 xm++; in ieee754sp_tlong()
77 xm++; in ieee754sp_tlong()
81 xm++; in ieee754sp_tlong()
[all …]
Ddp_add.c108 assert(xm & DP_HIDDEN_BIT); in ieee754dp_add()
114 xm <<= 3; in ieee754dp_add()
129 xm = XDPSRS(xm, s); in ieee754dp_add()
140 xm = xm + ym; in ieee754dp_add()
142 if (xm >> (DP_FBITS + 1 + 3)) { /* carry out */ in ieee754dp_add()
143 xm = XDPSRS1(xm); in ieee754dp_add()
147 if (xm >= ym) { in ieee754dp_add()
148 xm = xm - ym; in ieee754dp_add()
150 xm = ym - xm; in ieee754dp_add()
153 if (xm == 0) in ieee754dp_add()
[all …]
Ddp_sub.c115 assert(xm & DP_HIDDEN_BIT); in ieee754dp_sub()
120 xm <<= 3; in ieee754dp_sub()
135 xm = XDPSRS(xm, s); in ieee754dp_sub()
144 xm = xm + ym; in ieee754dp_sub()
146 if (xm >> (DP_FBITS + 1 + 3)) { /* carry out */ in ieee754dp_sub()
147 xm = XDPSRS1(xm); /* shift preserving sticky */ in ieee754dp_sub()
151 if (xm >= ym) { in ieee754dp_sub()
152 xm = xm - ym; in ieee754dp_sub()
154 xm = ym - xm; in ieee754dp_sub()
157 if (xm == 0) { in ieee754dp_sub()
[all …]
Dsp_add.c108 assert(xm & SP_HIDDEN_BIT); in ieee754sp_add()
114 xm <<= 3; in ieee754sp_add()
129 xm = XSPSRS(xm, s); in ieee754sp_add()
140 xm = xm + ym; in ieee754sp_add()
142 if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */ in ieee754sp_add()
146 if (xm >= ym) { in ieee754sp_add()
147 xm = xm - ym; in ieee754sp_add()
149 xm = ym - xm; in ieee754sp_add()
152 if (xm == 0) in ieee754sp_add()
158 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_add()
[all …]
Dsp_sub.c113 assert(xm & SP_HIDDEN_BIT); in ieee754sp_sub()
118 xm <<= 3; in ieee754sp_sub()
133 xm = XSPSRS(xm, s); in ieee754sp_sub()
142 xm = xm + ym; in ieee754sp_sub()
144 if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */ in ieee754sp_sub()
148 if (xm >= ym) { in ieee754sp_sub()
149 xm = xm - ym; in ieee754sp_sub()
151 xm = ym - xm; in ieee754sp_sub()
154 if (xm == 0) { in ieee754sp_sub()
162 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_sub()
[all …]
Dsp_fint.c14 unsigned int xm; in ieee754sp_fint() local
30 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754sp_fint()
32 xm = -x; in ieee754sp_fint()
34 xm = x; in ieee754sp_fint()
38 if (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_fint()
41 while (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_fint()
47 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_fint()
48 xm <<= 1; in ieee754sp_fint()
52 return ieee754sp_format(xs, xe, xm); in ieee754sp_fint()
Ddp_flong.c14 u64 xm; in ieee754dp_flong() local
30 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754dp_flong()
32 xm = -x; in ieee754dp_flong()
34 xm = x; in ieee754dp_flong()
39 if (xm >> (DP_FBITS + 1 + 3)) { in ieee754dp_flong()
41 while (xm >> (DP_FBITS + 1 + 3)) { in ieee754dp_flong()
46 while ((xm >> (DP_FBITS + 3)) == 0) { in ieee754dp_flong()
47 xm <<= 1; in ieee754dp_flong()
52 return ieee754dp_format(xs, xe, xm); in ieee754dp_flong()
Dsp_flong.c14 u64 xm; /* <--- need 64-bit mantissa temp */ in ieee754sp_flong() local
30 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754sp_flong()
32 xm = -x; in ieee754sp_flong()
34 xm = x; in ieee754sp_flong()
38 if (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_flong()
41 while (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_flong()
46 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_flong()
47 xm <<= 1; in ieee754sp_flong()
51 return ieee754sp_format(xs, xe, xm); in ieee754sp_flong()
Ddp_rint.c41 residue = xm; in ieee754dp_rint()
44 xm = 0; in ieee754dp_rint()
46 residue = xm << (64 - DP_FBITS + xe); in ieee754dp_rint()
49 xm >>= DP_FBITS - xe; in ieee754dp_rint()
52 odd = (xm & 0x1) != 0x0; in ieee754dp_rint()
57 xm++; in ieee754dp_rint()
63 xm++; in ieee754dp_rint()
67 xm++; in ieee754dp_rint()
74 ret = ieee754dp_flong(xm); in ieee754dp_rint()
Dsp_rint.c41 residue = xm; in ieee754sp_rint()
44 xm = 0; in ieee754sp_rint()
46 residue = xm << (xe + 1); in ieee754sp_rint()
50 xm >>= SP_FBITS - xe; in ieee754sp_rint()
53 odd = (xm & 0x1) != 0x0; in ieee754sp_rint()
58 xm++; in ieee754sp_rint()
64 xm++; in ieee754sp_rint()
68 xm++; in ieee754sp_rint()
75 ret = ieee754sp_flong(xm); in ieee754sp_rint()
Ddp_fsp.c13 static inline union ieee754dp ieee754dp_nan_fsp(int xs, u64 xm) in ieee754dp_nan_fsp() argument
16 xm << (DP_FBITS - SP_FBITS)); in ieee754dp_nan_fsp()
31 return ieee754dp_nanxcpt(ieee754dp_nan_fsp(xs, xm)); in ieee754dp_fsp()
34 return ieee754dp_nan_fsp(xs, xm); in ieee754dp_fsp()
44 while ((xm >> SP_FBITS) == 0) { in ieee754dp_fsp()
45 xm <<= 1; in ieee754dp_fsp()
59 xm &= ~SP_HIDDEN_BIT; in ieee754dp_fsp()
62 (u64) xm << (DP_FBITS - SP_FBITS)); in ieee754dp_fsp()
Ddp_fint.c14 u64 xm; in ieee754dp_fint() local
30 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754dp_fint()
32 xm = -x; in ieee754dp_fint()
34 xm = x; in ieee754dp_fint()
39 while ((xm >> DP_FBITS) == 0) { in ieee754dp_fint()
40 xm <<= 1; in ieee754dp_fint()
43 return builddp(xs, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT); in ieee754dp_fint()
Ddp_div.c107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_div()
111 xm <<= 3; in ieee754dp_div()
120 if (xm >= ym) { in ieee754dp_div()
121 xm -= ym; in ieee754dp_div()
123 if (xm == 0) in ieee754dp_div()
126 xm <<= 1; in ieee754dp_div()
130 if (xm) in ieee754dp_div()
Dsp_div.c107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_div()
111 xm <<= 3; in ieee754sp_div()
120 if (xm >= ym) { in ieee754sp_div()
121 xm -= ym; in ieee754sp_div()
123 if (xm == 0) in ieee754sp_div()
126 xm <<= 1; in ieee754sp_div()
130 if (xm) in ieee754sp_div()
Dsp_fdp.c13 static inline union ieee754sp ieee754sp_nan_fdp(int xs, u64 xm) in ieee754sp_nan_fdp() argument
16 xm >> (DP_FBITS - SP_FBITS)); in ieee754sp_nan_fdp()
40 y = ieee754sp_nan_fdp(xs, xm); in ieee754sp_fdp()
70 rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) | in ieee754sp_fdp()
71 ((xm << (64 - (DP_FBITS - (SP_FBITS + 3)))) != 0); in ieee754sp_fdp()
Dieee754dp.h41 (xe++, (xm = (xm >> 1) | (xm & 1)))
52 #define DPDNORMX DPDNORMx(xm, xe)
Dieee754int.h45 unsigned int xm; int xe; int xs __maybe_unused; int xc
77 #define EXPLODEXSP EXPLODESP(x, xc, xs, xe, xm)
83 u64 xm; int xe; int xs __maybe_unused; int xc
115 #define EXPLODEXDP EXPLODEDP(x, xc, xs, xe, xm)
141 #define FLUSHXDP FLUSHDP(x, xc, xs, xe, xm)
144 #define FLUSHXSP FLUSHSP(x, xc, xs, xe, xm)
Ddp_fmax.c108 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmax()
135 if (xm <= ym) in ieee754dp_fmax()
140 if (xm <= ym) in ieee754dp_fmax()
237 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmaxa()
247 if (xm < ym) in ieee754dp_fmaxa()
249 else if (xm > ym) in ieee754dp_fmaxa()
Dsp_fmax.c108 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmax()
135 if (xm <= ym) in ieee754sp_fmax()
140 if (xm <= ym) in ieee754sp_fmax()
237 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmaxa()
247 if (xm < ym) in ieee754sp_fmaxa()
249 else if (xm > ym) in ieee754sp_fmaxa()
Ddp_fmin.c108 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmin()
135 if (xm <= ym) in ieee754dp_fmin()
140 if (xm <= ym) in ieee754dp_fmin()
237 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmina()
247 if (xm < ym) in ieee754dp_fmina()
249 else if (xm > ym) in ieee754dp_fmina()

12