Skip to content

Commit 999eae9

Browse files
AMarkovicralfbaechle
authored andcommitted
MIPS: math-emu: Avoid definition duplication for macro DPXMULT()
Avoid duplicate definition of macro DPXMULT(). Move its definition to a header. Signed-off-by: Aleksandar Markovic <[email protected]> Cc: Douglas Leung <[email protected]> Cc: Goran Ferenc <[email protected]> Cc: James Hogan <[email protected]> Cc: Miodrag Dinic <[email protected]> Cc: Paul Burton <[email protected]> Cc: Petar Jovanovic <[email protected]> Cc: Raghu Gandham <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/17584/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent ddae82d commit 999eae9

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

arch/mips/math-emu/dp_maddf.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ static union ieee754dp _dp_maddf(union ieee754dp z, union ieee754dp x,
201201
* Multiply 64 bits xm and ym to give 128 bits result in hrm:lrm.
202202
*/
203203

204-
/* 32 * 32 => 64 */
205-
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
206-
207204
lxm = xm;
208205
hxm = xm >> 32;
209206
lym = ym;

arch/mips/math-emu/dp_mul.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y)
128128
* Multiply 64 bits xm, ym to give high 64 bits rm with stickness.
129129
*/
130130

131-
/* 32 * 32 => 64 */
132-
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
133-
134131
lxm = xm;
135132
hxm = xm >> 32;
136133
lym = ym;

arch/mips/math-emu/ieee754dp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ static inline int ieee754dp_finite(union ieee754dp x)
5555
#define XDPSRS1(v) \
5656
(((v) >> 1) | ((v) & 1))
5757

58+
/* 32bit * 32bit => 64bit unsigned integer multiplication */
59+
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
60+
5861
/* convert denormal to normalized with extended exponent */
5962
#define DPDNORMx(m,e) \
6063
while ((m >> DP_FBITS) == 0) { m <<= 1; e--; }

0 commit comments

Comments
 (0)