From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: ppc: add missing parens with e500 macro
Date: Wed, 9 Nov 2022 22:34:53 +0700 [thread overview]
Message-ID: <20221109153453.7544-1-vapier@gentoo.org> (raw)
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.
---
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 1a27bb189e85..86d033ae66f3 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)
--
2.38.1
reply other threads:[~2022-11-09 15:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221109153453.7544-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).