Commit 999eae9b authored by Aleksandar Markovic's avatar Aleksandar Markovic Committed by Ralf Baechle

MIPS: math-emu: Avoid definition duplication for macro DPXMULT()

Avoid duplicate definition of macro DPXMULT(). Move its definition
to a header.
Signed-off-by: default avatarAleksandar Markovic <aleksandar.markovic@mips.com>
Cc: Douglas Leung <douglas.leung@mips.com>
Cc: Goran Ferenc <goran.ferenc@mips.com>
Cc: James Hogan <james.hogan@mips.com>
Cc: Miodrag Dinic <miodrag.dinic@mips.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Petar Jovanovic <petar.jovanovic@mips.com>
Cc: Raghu Gandham <raghu.gandham@mips.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17584/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent ddae82d0
...@@ -201,9 +201,6 @@ static union ieee754dp _dp_maddf(union ieee754dp z, union ieee754dp x, ...@@ -201,9 +201,6 @@ static union ieee754dp _dp_maddf(union ieee754dp z, union ieee754dp x,
* Multiply 64 bits xm and ym to give 128 bits result in hrm:lrm. * Multiply 64 bits xm and ym to give 128 bits result in hrm:lrm.
*/ */
/* 32 * 32 => 64 */
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
lxm = xm; lxm = xm;
hxm = xm >> 32; hxm = xm >> 32;
lym = ym; lym = ym;
......
...@@ -128,9 +128,6 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y) ...@@ -128,9 +128,6 @@ union ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y)
* Multiply 64 bits xm, ym to give high 64 bits rm with stickness. * Multiply 64 bits xm, ym to give high 64 bits rm with stickness.
*/ */
/* 32 * 32 => 64 */
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
lxm = xm; lxm = xm;
hxm = xm >> 32; hxm = xm >> 32;
lym = ym; lym = ym;
......
...@@ -55,6 +55,9 @@ static inline int ieee754dp_finite(union ieee754dp x) ...@@ -55,6 +55,9 @@ static inline int ieee754dp_finite(union ieee754dp x)
#define XDPSRS1(v) \ #define XDPSRS1(v) \
(((v) >> 1) | ((v) & 1)) (((v) >> 1) | ((v) & 1))
/* 32bit * 32bit => 64bit unsigned integer multiplication */
#define DPXMULT(x, y) ((u64)(x) * (u64)y)
/* convert denormal to normalized with extended exponent */ /* convert denormal to normalized with extended exponent */
#define DPDNORMx(m,e) \ #define DPDNORMx(m,e) \
while ((m >> DP_FBITS) == 0) { m <<= 1; e--; } while ((m >> DP_FBITS) == 0) { m <<= 1; e--; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment