Home
last modified time | relevance | path

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

12

/Linux-v5.10/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 …]
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_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 …]
Ddp_add.c107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_add()
113 xm <<= 3; in ieee754dp_add()
128 xm = XDPSRS(xm, s); in ieee754dp_add()
139 xm = xm + ym; in ieee754dp_add()
141 if (xm >> (DP_FBITS + 1 + 3)) { /* carry out */ in ieee754dp_add()
142 xm = XDPSRS1(xm); in ieee754dp_add()
146 if (xm >= ym) { in ieee754dp_add()
147 xm = xm - ym; in ieee754dp_add()
149 xm = ym - xm; in ieee754dp_add()
152 if (xm == 0) in ieee754dp_add()
[all …]
Ddp_sub.c114 assert(xm & DP_HIDDEN_BIT); in ieee754dp_sub()
119 xm <<= 3; in ieee754dp_sub()
134 xm = XDPSRS(xm, s); in ieee754dp_sub()
143 xm = xm + ym; in ieee754dp_sub()
145 if (xm >> (DP_FBITS + 1 + 3)) { /* carry out */ in ieee754dp_sub()
146 xm = XDPSRS1(xm); /* shift preserving sticky */ in ieee754dp_sub()
150 if (xm >= ym) { in ieee754dp_sub()
151 xm = xm - ym; in ieee754dp_sub()
153 xm = ym - xm; in ieee754dp_sub()
156 if (xm == 0) { in ieee754dp_sub()
[all …]
Dsp_add.c107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_add()
113 xm <<= 3; in ieee754sp_add()
128 xm = XSPSRS(xm, s); in ieee754sp_add()
139 xm = xm + ym; in ieee754sp_add()
141 if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */ in ieee754sp_add()
145 if (xm >= ym) { in ieee754sp_add()
146 xm = xm - ym; in ieee754sp_add()
148 xm = ym - xm; in ieee754sp_add()
151 if (xm == 0) in ieee754sp_add()
157 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_add()
[all …]
Dsp_sub.c112 assert(xm & SP_HIDDEN_BIT); in ieee754sp_sub()
117 xm <<= 3; in ieee754sp_sub()
132 xm = XSPSRS(xm, s); in ieee754sp_sub()
141 xm = xm + ym; in ieee754sp_sub()
143 if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */ in ieee754sp_sub()
147 if (xm >= ym) { in ieee754sp_sub()
148 xm = xm - ym; in ieee754sp_sub()
150 xm = ym - xm; in ieee754sp_sub()
153 if (xm == 0) { in ieee754sp_sub()
161 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()
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_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()
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.c106 assert(xm & DP_HIDDEN_BIT); in ieee754dp_div()
110 xm <<= 3; in ieee754dp_div()
119 if (xm >= ym) { in ieee754dp_div()
120 xm -= ym; in ieee754dp_div()
122 if (xm == 0) in ieee754dp_div()
125 xm <<= 1; in ieee754dp_div()
129 if (xm) in ieee754dp_div()
Dsp_div.c106 assert(xm & SP_HIDDEN_BIT); in ieee754sp_div()
110 xm <<= 3; in ieee754sp_div()
119 if (xm >= ym) { in ieee754sp_div()
120 xm -= ym; in ieee754sp_div()
122 if (xm == 0) in ieee754sp_div()
125 xm <<= 1; in ieee754sp_div()
129 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()
39 y = ieee754sp_nan_fdp(xs, xm); in ieee754sp_fdp()
69 rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) | in ieee754sp_fdp()
70 ((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.h46 unsigned int xm; int xe; int xs __maybe_unused; int xc
78 #define EXPLODEXSP EXPLODESP(x, xc, xs, xe, xm)
84 u64 xm; int xe; int xs __maybe_unused; int xc
116 #define EXPLODEXDP EXPLODEDP(x, xc, xs, xe, xm)
142 #define FLUSHXDP FLUSHDP(x, xc, xs, xe, xm)
145 #define FLUSHXSP FLUSHSP(x, xc, xs, xe, xm)
Dsp_fmax.c107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmax()
134 if (xm <= ym) in ieee754sp_fmax()
139 if (xm <= ym) in ieee754sp_fmax()
235 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmaxa()
245 if (xm < ym) in ieee754sp_fmaxa()
247 else if (xm > ym) in ieee754sp_fmaxa()
Dsp_fmin.c107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmin()
134 if (xm <= ym) in ieee754sp_fmin()
139 if (xm <= ym) in ieee754sp_fmin()
235 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmina()
245 if (xm < ym) in ieee754sp_fmina()
247 else if (xm > ym) in ieee754sp_fmina()
Ddp_fmax.c107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmax()
134 if (xm <= ym) in ieee754dp_fmax()
139 if (xm <= ym) in ieee754dp_fmax()
235 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmaxa()
245 if (xm < ym) in ieee754dp_fmaxa()
247 else if (xm > ym) in ieee754dp_fmaxa()

12