From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 03/14] tcg: Expand glue macros before stringifying helper names
Date: Tue, 18 Jul 2017 18:57:11 -1000 [thread overview]
Message-ID: <20170719045722.25492-4-rth@twiddle.net> (raw)
In-Reply-To: <20170719045722.25492-1-rth@twiddle.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
include/exec/helper-tcg.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/exec/helper-tcg.h b/include/exec/helper-tcg.h
index bb92877..b0c5baf 100644
--- a/include/exec/helper-tcg.h
+++ b/include/exec/helper-tcg.h
@@ -6,31 +6,35 @@
#include "exec/helper-head.h"
+/* Need one more level of indirection before stringification
+ to get all the macros expanded first. */
+#define str(s) #s
+
#define DEF_HELPER_FLAGS_0(NAME, FLAGS, ret) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) },
#define DEF_HELPER_FLAGS_1(NAME, FLAGS, ret, t1) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
#define DEF_HELPER_FLAGS_2(NAME, FLAGS, ret, t1, t2) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
| dh_sizemask(t2, 2) },
#define DEF_HELPER_FLAGS_3(NAME, FLAGS, ret, t1, t2, t3) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) },
#define DEF_HELPER_FLAGS_4(NAME, FLAGS, ret, t1, t2, t3, t4) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) },
#define DEF_HELPER_FLAGS_5(NAME, FLAGS, ret, t1, t2, t3, t4, t5) \
- { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
+ { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
| dh_sizemask(t5, 5) },
@@ -39,6 +43,7 @@
#include "trace/generated-helpers.h"
#include "tcg-runtime.h"
+#undef str
#undef DEF_HELPER_FLAGS_0
#undef DEF_HELPER_FLAGS_1
#undef DEF_HELPER_FLAGS_2
--
2.9.4
next prev parent reply other threads:[~2017-07-19 4:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 4:57 [Qemu-devel] [PULL 00/14] tcg-next patch queue Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 01/14] tcg/mips: reserve a register for the guest_base Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 02/14] util/cacheinfo: Add missing include for ppc linux Richard Henderson
2017-07-19 4:57 ` Richard Henderson [this message]
2017-07-19 4:57 ` [Qemu-devel] [PULL 04/14] coccinelle: ignore ASTs pre-parsed cached C files Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 05/14] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 06/14] target/arm: Optimize aarch64 rev16 Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 07/14] target/arm: optimize aarch32 rev16 Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 08/14] target/m68k: optimize bcd_flags() using extract op Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 09/14] target/ppc: optimize various functions " Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 10/14] target/sparc: " Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 11/14] target/sparc: optimize gen_op_mulscc() using deposit op Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 12/14] target/alpha: optimize gen_cvtlq() " Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 13/14] tcg/tci: enable bswap16_i64 Richard Henderson
2017-07-19 4:57 ` [Qemu-devel] [PULL 14/14] tcg: Pass generic CPUState to gen_intermediate_code() Richard Henderson
2017-07-19 6:06 ` [Qemu-devel] [PULL 00/14] tcg-next patch queue no-reply
2017-07-19 19:45 ` Peter Maydell
2017-07-19 20:33 ` Philippe Mathieu-Daudé
2017-07-19 21:36 ` Richard Henderson
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=20170719045722.25492-4-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).