From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 8/8] target/cris: Fix a typo in gen_swapr()
Date: Wed, 23 Aug 2023 16:55:42 +0200 [thread overview]
Message-ID: <20230823145542.79633-9-philmd@linaro.org> (raw)
In-Reply-To: <20230823145542.79633-1-philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/cris/translate.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/target/cris/translate.c b/target/cris/translate.c
index 0b3d724281..42103b5558 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -411,15 +411,17 @@ static inline void t_gen_swapw(TCGv d, TCGv s)
tcg_gen_or_tl(d, d, t);
}
-/* Reverse the within each byte.
- T0 = (((T0 << 7) & 0x80808080) |
- ((T0 << 5) & 0x40404040) |
- ((T0 << 3) & 0x20202020) |
- ((T0 << 1) & 0x10101010) |
- ((T0 >> 1) & 0x08080808) |
- ((T0 >> 3) & 0x04040404) |
- ((T0 >> 5) & 0x02020202) |
- ((T0 >> 7) & 0x01010101));
+/*
+ * Reverse the bits within each byte.
+ *
+ * T0 = ((T0 << 7) & 0x80808080)
+ * | ((T0 << 5) & 0x40404040)
+ * | ((T0 << 3) & 0x20202020)
+ * | ((T0 << 1) & 0x10101010)
+ * | ((T0 >> 1) & 0x08080808)
+ * | ((T0 >> 3) & 0x04040404)
+ * | ((T0 >> 5) & 0x02020202)
+ * | ((T0 >> 7) & 0x01010101);
*/
static void t_gen_swapr(TCGv d, TCGv s)
{
--
2.41.0
next prev parent reply other threads:[~2023-08-23 14:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 14:55 [PATCH v2 0/8] tcg: Document *swap* helper implementations Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 1/8] tcg/tcg-op: Document bswap16_i32() byte pattern Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 2/8] tcg/tcg-op: Document bswap16_i64() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 3/8] tcg/tcg-op: Document bswap32_i32() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 4/8] tcg/tcg-op: Document bswap32_i64() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 5/8] tcg/tcg-op: Document bswap64_i64() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 6/8] tcg/tcg-op: Document hswap_i32/64() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` [PATCH v2 7/8] tcg/tcg-op: Document wswap_i64() " Philippe Mathieu-Daudé
2023-08-23 14:55 ` Philippe Mathieu-Daudé [this message]
2023-09-01 15:59 ` [PATCH v2 8/8] target/cris: Fix a typo in gen_swapr() Edgar E. Iglesias
2023-08-23 18:46 ` [PATCH v2 0/8] tcg: Document *swap* helper implementations Richard Henderson
2023-08-23 21:54 ` Philippe Mathieu-Daudé
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=20230823145542.79633-9-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=edgar.iglesias@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 NNTP newsgroup(s).