From patchwork Wed Jul 19 23:34:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9853363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B668B60392 for ; Wed, 19 Jul 2017 23:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9549A286FD for ; Wed, 19 Jul 2017 23:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A31C28715; Wed, 19 Jul 2017 23:39:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3363E286FD for ; Wed, 19 Jul 2017 23:39:45 +0000 (UTC) Received: from localhost ([::1]:35396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXyZE-0001gj-Dl for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Jul 2017 19:39:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXyVR-00084l-9a for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:35:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXyVO-0006Z7-5e for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:35:49 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:35022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXyVN-0006Yt-UE for qemu-devel@nongnu.org; Wed, 19 Jul 2017 19:35:46 -0400 Received: by mail-qk0-x244.google.com with SMTP id t186so1002409qkf.2 for ; Wed, 19 Jul 2017 16:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=6PvZ8GAxxe8x9sw++K5FvTLzKjo50IVYELK5nkwTEL8=; b=otfzJaShxB6hlMN4Dd5GsV9fh/eSUzEgf1VPfdAJHxEUS49QYDel+jjNTwgYX/+5x3 rslw94wVBju91h9hRsSTc86dByziNw4Wk1sSgPTNlmFh6hjyZYRZKshhHhFQ3xpIEtVj 5MLVjrpwrxPWqwdvc8f++05dLWjexFURF6OvhJwVa2+UHNbyzHLJkyRGzsEoYCPRod4a MdnmcQerEQfUiKd7ulqRwYJdMn6JyvJ+xyyHUvIDI97AUYUcCWd8bk5H69dNZ8Voif/K 7X3BZ+4qI2rc9uiLSrKQxtZn4oRAqfhZQB61vaOfvD5PZfg88cJCoO9EUd9Eo725+CGq EP6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=6PvZ8GAxxe8x9sw++K5FvTLzKjo50IVYELK5nkwTEL8=; b=ZTEdSRibJzandicPGqSxSZ8FF9wSv2N8D7NNi6XmBX2yZaxxAYftz4iHR5zzAfZBx3 MEVO09CyXoJG/Vh76yidEhMFph/lzGP86hDGZNKvth+95UmK2TxfOgEjyhqNjCyJBDXi PVkt8E4cLcBcTpWTUoS7Ce51VKVzvzTYtVSpiPADTRe1uixQb0UaWO9b0UdPzacUtln7 ugNYWdTAbvgUOOLkubs/s44RI73lDqsWMNu49NxuO9YsFsyjs/TJWYNBvOJ5zI5l+fJR omkcMxIDGoFkNiaGEUFE+2xczjQFYRdv8x1Eb2g/dou+ElZzQa1dBompDj1uy5jl///U 79BQ== X-Gm-Message-State: AIVw111vXk8ri9zA0dCy5U3kIUco3yL97STXiuXJcBg2WlzEPvaWAg/4 MvOUSnc+UDYOChwAwuc= X-Received: by 10.233.223.68 with SMTP id t65mr2599994qkf.122.1500507345074; Wed, 19 Jul 2017 16:35:45 -0700 (PDT) Received: from bigtime.com ([203.221.203.174]) by smtp.gmail.com with ESMTPSA id w33sm857130qth.96.2017.07.19.16.35.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jul 2017 16:35:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 13:34:44 -1000 Message-Id: <20170719233455.8740-4-rth@twiddle.net> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170719233455.8740-1-rth@twiddle.net> References: <20170719233455.8740-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PULL v2 03/14] tcg: Expand glue macros before stringifying helper names X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson --- 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 bb9287727c..b0c5bafa99 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