public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: ppc: add missing parens with e500 macro
@ 2022-11-09 15:35 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-11-09 15:35 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c2264c8f78f353daebce3086ae52b3c1cf2f0a8d
commit c2264c8f78f353daebce3086ae52b3c1cf2f0a8d
Author: Mike Frysinger <vapier@gentoo.org>
Date: Wed Nov 9 22:33:27 2022 +0700
sim: ppc: add missing parens with e500 macro
This macro expansion was missing a set of outer-most parenthesis which
some compilers would complain about depending on how the macro is used.
This is just standard good macro hygiene too.
Diff:
---
sim/ppc/e500_expression.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sim/ppc/e500_expression.h b/sim/ppc/e500_expression.h
index 1a27bb189e8..86d033ae66f 100644
--- a/sim/ppc/e500_expression.h
+++ b/sim/ppc/e500_expression.h
@@ -68,22 +68,22 @@
/* bit manipulation macros needed for e500 SPE */
#define EV_BITREVERSE16(x) \
- (((x) & 0x0001) << 15) \
- | (((x) & 0x0002) << 13) \
- | (((x) & 0x0004) << 11) \
- | (((x) & 0x0008) << 9) \
- | (((x) & 0x0010) << 7) \
- | (((x) & 0x0020) << 5) \
- | (((x) & 0x0040) << 3) \
- | (((x) & 0x0080) << 1) \
- | (((x) & 0x0100) >> 1) \
- | (((x) & 0x0200) >> 3) \
- | (((x) & 0x0400) >> 5) \
- | (((x) & 0x0800) >> 7) \
- | (((x) & 0x1000) >> 9) \
- | (((x) & 0x2000) >> 11) \
- | (((x) & 0x4000) >> 13) \
- | (((x) & 0x8000) >> 15)
+ ((((x) & 0x0001) << 15) \
+ | (((x) & 0x0002) << 13) \
+ | (((x) & 0x0004) << 11) \
+ | (((x) & 0x0008) << 9) \
+ | (((x) & 0x0010) << 7) \
+ | (((x) & 0x0020) << 5) \
+ | (((x) & 0x0040) << 3) \
+ | (((x) & 0x0080) << 1) \
+ | (((x) & 0x0100) >> 1) \
+ | (((x) & 0x0200) >> 3) \
+ | (((x) & 0x0400) >> 5) \
+ | (((x) & 0x0800) >> 7) \
+ | (((x) & 0x1000) >> 9) \
+ | (((x) & 0x2000) >> 11) \
+ | (((x) & 0x4000) >> 13) \
+ | (((x) & 0x8000) >> 15))
/* saturation helpers */
#define EV_MUL16_SSF(a,b) ((int64_t)((int32_t)(int16_t)(a) * (int32_t)(int16_t)(b)) << 1)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-09 15:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 15:35 [binutils-gdb] sim: ppc: add missing parens with e500 macro Michael Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).