lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 2 Nov 2017 12:14:01 +0100 From: Aleksandar Markovic <aleksandar.markovic@...rk.com> To: linux-mips@...ux-mips.org Cc: Aleksandar Markovic <aleksandar.markovic@...s.com>, Douglas Leung <douglas.leung@...tec.com>, Douglas Leung <douglas.leung@...s.com>, Goran Ferenc <goran.ferenc@...tec.com>, Goran Ferenc <goran.ferenc@...s.com>, James Hogan <james.hogan@...s.com>, linux-kernel@...r.kernel.org, Miodrag Dinic <miodrag.dinic@...tec.com>, Miodrag Dinic <miodrag.dinic@...s.com>, Paul Burton <paul.burton@...s.com>, Petar Jovanovic <petar.jovanovic@...s.com>, Raghu Gandham <raghu.gandham@...s.com>, Ralf Baechle <ralf@...ux-mips.org> Subject: [PATCH v3 4/8] MIPS: math-emu: Avoid definition duplication for macro DPXMULT() From: Aleksandar Markovic <aleksandar.markovic@...s.com> Avoid duplicate definition of macro DPXMULT(). Move its definition to a header. Signed-off-by: Aleksandar Markovic <aleksandar.markovic@...s.com> --- arch/mips/math-emu/dp_maddf.c | 3 --- arch/mips/math-emu/dp_mul.c | 3 --- arch/mips/math-emu/ieee754dp.h | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/mips/math-emu/dp_maddf.c b/arch/mips/math-emu/dp_maddf.c index 7ad79ed..28b90fd 100644 --- a/arch/mips/math-emu/dp_maddf.c +++ b/arch/mips/math-emu/dp_maddf.c @@ -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. */ - /* 32 * 32 => 64 */ -#define DPXMULT(x, y) ((u64)(x) * (u64)y) - lxm = xm; hxm = xm >> 32; lym = ym; diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c index 60c8bfe..7bc5dde 100644 --- a/arch/mips/math-emu/dp_mul.c +++ b/arch/mips/math-emu/dp_mul.c @@ -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. */ - /* 32 * 32 => 64 */ -#define DPXMULT(x, y) ((u64)(x) * (u64)y) - lxm = xm; hxm = xm >> 32; lym = ym; diff --git a/arch/mips/math-emu/ieee754dp.h b/arch/mips/math-emu/ieee754dp.h index 9ba0230..a56707b 100644 --- a/arch/mips/math-emu/ieee754dp.h +++ b/arch/mips/math-emu/ieee754dp.h @@ -55,6 +55,9 @@ static inline int ieee754dp_finite(union ieee754dp x) #define XDPSRS1(v) \ (((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 */ #define DPDNORMx(m,e) \ while ((m >> DP_FBITS) == 0) { m <<= 1; e--; } -- 2.7.4
Powered by blists - more mailing lists