Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/811205/?format=api
{ "id": 811205, "url": "http://patchwork.ozlabs.org/api/1.2/patches/811205/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-3-richard.henderson@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170907224051.21518-3-richard.henderson@linaro.org>", "list_archive_url": null, "date": "2017-09-07T22:40:30", "name": "[PULL,02/23] tcg: Rearrange ldst label tracking", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "27134bf118e679995cbb0a6c417d9b215a9c1282", "submitter": { "id": 72104, "url": "http://patchwork.ozlabs.org/api/1.2/people/72104/?format=api", "name": "Richard Henderson", "email": "richard.henderson@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170907224051.21518-3-richard.henderson@linaro.org/mbox/", "series": [ { "id": 2073, "url": "http://patchwork.ozlabs.org/api/1.2/series/2073/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2073", "date": "2017-09-07T22:40:28", "name": "[PULL,01/23] tcg: Move USE_DIRECT_JUMP discriminator to tcg/cpu/tcg-target.h", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2073/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811205/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811205/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"SGTs+iwD\"; dkim-atps=neutral" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpFrN459Bz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 08:44:36 +1000 (AEST)", "from localhost ([::1]:42523 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dq5XG-0005PZ-He\n\tfor incoming@patchwork.ozlabs.org; Thu, 07 Sep 2017 18:44:34 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:51942)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Ts-0002xQ-Eo\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:10 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <richard.henderson@linaro.org>) id 1dq5Tm-00080a-OT\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:04 -0400", "from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]:36486)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <richard.henderson@linaro.org>)\n\tid 1dq5Tm-000808-GA\n\tfor qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:40:58 -0400", "by mail-pf0-x231.google.com with SMTP id e199so1621667pfh.3\n\tfor <qemu-devel@nongnu.org>; Thu, 07 Sep 2017 15:40:58 -0700 (PDT)", "from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net.\n\t[97.126.108.236]) by smtp.gmail.com with ESMTPSA id\n\th19sm770678pfh.142.2017.09.07.15.40.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 07 Sep 2017 15:40:55 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=S2df7Us213tGoZSMo2fbN848O/tBS8d6oJFU35pfhgE=;\n\tb=SGTs+iwDlmQLCEYn+/CnomKa6Hhv52TDnhUX9A2DC7nww0HcNe/RlzKxLWzW/hu6vo\n\tI868QkGnLB52iJ9zimqqOSvpp7d8a8HjxD4oVikMnq3irZyibQPLPFfTffSYjJA9UzPE\n\t10gbG9KmhDHX1JQxUk7TZE0JMFds8nAtBLAgo=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=S2df7Us213tGoZSMo2fbN848O/tBS8d6oJFU35pfhgE=;\n\tb=U/S6og9XqMczZD94ru72HBYD0Xu39AaOsW5zCB892O6d9V1gkd/lhvsoIH7STPoa+g\n\to8rMiqQv+QqKsTL/vIX8ylyn7i3uELv3zU4UwpevQ31aV8GRQSoiAj/KWouAFOgxuFeY\n\t370rCtEQkJXBso/LDSrK5SMb1KFtW2tNdWT50XOm48xZm7wrcnI3UmuVB60Pai4fu8l3\n\tyVz/sZGeDeWvZw3qxjxGjAHpmb/Bp01DNHa32wZ2scnBtcWgT6IT+AzlZEJZCThWoo1A\n\tXoQAxioVeaWdDRjtZuAOT45+9hofMFxj6Yt/NZPivKCl17sqnbtpbsLEaO+qKHQc5W5r\n\tTjCA==", "X-Gm-Message-State": "AHPjjUjuxkHi4oYSCLrBnFZj4xte7g/UNCM61k6znToEqwz/NZcDx48B\n\t7Y7LrYml/9gicPH9CRZLLg==", "X-Google-Smtp-Source": "ADKCNb6qBpk6oaMiqTghNtPZr+ktqqzkNR4kpdWOLaUKulxV/FtYfqMDeH6sHdcDDI3mKvxmAgxVXg==", "X-Received": "by 10.98.31.217 with SMTP id l86mr970172pfj.136.1504824057037;\n\tThu, 07 Sep 2017 15:40:57 -0700 (PDT)", "From": "Richard Henderson <richard.henderson@linaro.org>", "To": "qemu-devel@nongnu.org", "Date": "Thu, 7 Sep 2017 15:40:30 -0700", "Message-Id": "<20170907224051.21518-3-richard.henderson@linaro.org>", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170907224051.21518-1-richard.henderson@linaro.org>", "References": "<20170907224051.21518-1-richard.henderson@linaro.org>", "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.", "X-Received-From": "2607:f8b0:400e:c00::231", "Subject": "[Qemu-devel] [PULL 02/23] tcg: Rearrange ldst label tracking", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "peter.maydell@linaro.org, Richard Henderson <rth@twiddle.net>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "From: Richard Henderson <rth@twiddle.net>\n\nDispense with TCGBackendData, as it has never been used for more than\nholding a single pointer. Use a define in the cpu/tcg-target.h to\nsignal requirement for TCGLabelQemuLdst, so that we can drop the no-op\ntcg-be-null.h stubs. Rename tcg-be-ldst.h to tcg-ldst.inc.c.\n\nReviewed-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Richard Henderson <rth@twiddle.net>\n---\n tcg/aarch64/tcg-target.h | 4 ++++\n tcg/arm/tcg-target.h | 4 ++++\n tcg/i386/tcg-target.h | 4 ++++\n tcg/mips/tcg-target.h | 4 ++++\n tcg/ppc/tcg-target.h | 4 ++++\n tcg/s390/tcg-target.h | 4 ++++\n tcg/tcg-be-null.h | 44 -----------------------------------\n tcg/tcg.h | 6 +++--\n tcg/tci/tcg-target.h | 4 ++++\n tcg/aarch64/tcg-target.inc.c | 3 ++-\n tcg/arm/tcg-target.inc.c | 3 ++-\n tcg/i386/tcg-target.inc.c | 4 ++--\n tcg/mips/tcg-target.inc.c | 4 ++--\n tcg/ppc/tcg-target.inc.c | 4 ++--\n tcg/s390/tcg-target.inc.c | 4 ++--\n tcg/sparc/tcg-target.inc.c | 2 --\n tcg/{tcg-be-ldst.h => tcg-ldst.inc.c} | 27 ++++-----------------\n tcg/tcg.c | 17 +++++++-------\n tcg/tci/tcg-target.inc.c | 2 --\n 19 files changed, 57 insertions(+), 91 deletions(-)\n delete mode 100644 tcg/tcg-be-null.h\n rename tcg/{tcg-be-ldst.h => tcg-ldst.inc.c} (85%)", "diff": "diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h\nindex 719861fe3e..1bdbd7058b 100644\n--- a/tcg/aarch64/tcg-target.h\n+++ b/tcg/aarch64/tcg-target.h\n@@ -122,4 +122,8 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n \n void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif /* AARCH64_TCG_TARGET_H */\ndiff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h\nindex 7117ebf4fc..2e92cb3283 100644\n--- a/tcg/arm/tcg-target.h\n+++ b/tcg/arm/tcg-target.h\n@@ -140,4 +140,8 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n /* not defined -- call should be eliminated at compile time */\n void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif\ndiff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h\nindex 2fd28fa6a5..11ee7fadd1 100644\n--- a/tcg/i386/tcg-target.h\n+++ b/tcg/i386/tcg-target.h\n@@ -186,4 +186,8 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,\n \n #define TCG_TARGET_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD)\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif\ndiff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h\nindex 928a762bd7..a8222476f0 100644\n--- a/tcg/mips/tcg-target.h\n+++ b/tcg/mips/tcg-target.h\n@@ -211,4 +211,8 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)\n \n void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif\ndiff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h\nindex aa44e715d8..3772cc6648 100644\n--- a/tcg/ppc/tcg-target.h\n+++ b/tcg/ppc/tcg-target.h\n@@ -129,4 +129,8 @@ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t);\n \n #define TCG_TARGET_DEFAULT_MO (0)\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif\ndiff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h\nindex 31a9eb4ac7..52010c30cb 100644\n--- a/tcg/s390/tcg-target.h\n+++ b/tcg/s390/tcg-target.h\n@@ -155,4 +155,8 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,\n /* no need to flush icache explicitly */\n }\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif\ndiff --git a/tcg/tcg-be-null.h b/tcg/tcg-be-null.h\ndeleted file mode 100644\nindex 5222fe29e2..0000000000\n--- a/tcg/tcg-be-null.h\n+++ /dev/null\n@@ -1,44 +0,0 @@\n-/*\n- * TCG Backend Data: No backend data\n- *\n- * Permission is hereby granted, free of charge, to any person obtaining a copy\n- * of this software and associated documentation files (the \"Software\"), to deal\n- * in the Software without restriction, including without limitation the rights\n- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n- * copies of the Software, and to permit persons to whom the Software is\n- * furnished to do so, subject to the following conditions:\n- *\n- * The above copyright notice and this permission notice shall be included in\n- * all copies or substantial portions of the Software.\n- *\n- * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n- * THE SOFTWARE.\n- */\n-\n-typedef struct TCGBackendData {\n- /* Empty */\n- char dummy;\n-} TCGBackendData;\n-\n-\n-/*\n- * Initialize TB backend data at the beginning of the TB.\n- */\n-\n-static inline void tcg_out_tb_init(TCGContext *s)\n-{\n-}\n-\n-/*\n- * Generate TB finalization at the end of block\n- */\n-\n-static inline bool tcg_out_tb_finalize(TCGContext *s)\n-{\n- return true;\n-}\ndiff --git a/tcg/tcg.h b/tcg/tcg.h\nindex 46957d9bd7..b0e00e744e 100644\n--- a/tcg/tcg.h\n+++ b/tcg/tcg.h\n@@ -712,8 +712,10 @@ struct TCGContext {\n CPUState *cpu; /* *_trans */\n TCGv_env tcg_env; /* *_exec */\n \n- /* The TCGBackendData structure is private to tcg-target.inc.c. */\n- struct TCGBackendData *be;\n+ /* These structures are private to tcg-target.inc.c. */\n+#ifdef TCG_TARGET_NEED_LDST_LABELS\n+ struct TCGLabelQemuLdst *ldst_labels;\n+#endif\n \n TCGTempSet free_temps[TCG_TYPE_COUNT * 2];\n TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */\ndiff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h\nindex 26140d78cb..5d692e1f4b 100644\n--- a/tcg/tci/tcg-target.h\n+++ b/tcg/tci/tcg-target.h\n@@ -206,4 +206,8 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,\n /* no need to flush icache explicitly */\n }\n \n+#ifdef CONFIG_SOFTMMU\n+#define TCG_TARGET_NEED_LDST_LABELS\n+#endif\n+\n #endif /* TCG_TARGET_H */\ndiff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c\nindex a1e5dd2f03..c7c751bafc 100644\n--- a/tcg/aarch64/tcg-target.inc.c\n+++ b/tcg/aarch64/tcg-target.inc.c\n@@ -10,7 +10,6 @@\n * See the COPYING file in the top-level directory for details.\n */\n \n-#include \"tcg-be-ldst.h\"\n #include \"qemu/bitops.h\"\n \n /* We're going to re-use TCGType in setting of the SF bit, which controls\n@@ -1070,6 +1069,8 @@ static void tcg_out_cltz(TCGContext *s, TCGType ext, TCGReg d,\n }\n \n #ifdef CONFIG_SOFTMMU\n+#include \"tcg-ldst.inc.c\"\n+\n /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,\n * TCGMemOpIdx oi, uintptr_t ra)\n */\ndiff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c\nindex 37efcf06af..81ea900852 100644\n--- a/tcg/arm/tcg-target.inc.c\n+++ b/tcg/arm/tcg-target.inc.c\n@@ -23,7 +23,6 @@\n */\n \n #include \"elf.h\"\n-#include \"tcg-be-ldst.h\"\n \n int arm_arch = __ARM_ARCH;\n \n@@ -1060,6 +1059,8 @@ static inline void tcg_out_mb(TCGContext *s, TCGArg a0)\n }\n \n #ifdef CONFIG_SOFTMMU\n+#include \"tcg-ldst.inc.c\"\n+\n /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,\n * int mmu_idx, uintptr_t ra)\n */\ndiff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c\nindex e4b120a40c..1a1ad96906 100644\n--- a/tcg/i386/tcg-target.inc.c\n+++ b/tcg/i386/tcg-target.inc.c\n@@ -22,8 +22,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-ldst.h\"\n-\n #ifdef CONFIG_DEBUG_TCG\n static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {\n #if TCG_TARGET_REG_BITS == 64\n@@ -1214,6 +1212,8 @@ static void tcg_out_nopn(TCGContext *s, int n)\n }\n \n #if defined(CONFIG_SOFTMMU)\n+#include \"tcg-ldst.inc.c\"\n+\n /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr,\n * int mmu_idx, uintptr_t ra)\n */\ndiff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c\nindex 04f8c839fe..750baadf37 100644\n--- a/tcg/mips/tcg-target.inc.c\n+++ b/tcg/mips/tcg-target.inc.c\n@@ -24,8 +24,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-ldst.h\"\n-\n #ifdef HOST_WORDS_BIGENDIAN\n # define MIPS_BE 1\n #else\n@@ -1112,6 +1110,8 @@ static void tcg_out_call(TCGContext *s, tcg_insn_unit *arg)\n }\n \n #if defined(CONFIG_SOFTMMU)\n+#include \"tcg-ldst.inc.c\"\n+\n static void * const qemu_ld_helpers[16] = {\n [MO_UB] = helper_ret_ldub_mmu,\n [MO_SB] = helper_ret_ldsb_mmu,\ndiff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c\nindex 018c240f6d..d772faf7be 100644\n--- a/tcg/ppc/tcg-target.inc.c\n+++ b/tcg/ppc/tcg-target.inc.c\n@@ -22,8 +22,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-ldst.h\"\n-\n #if defined _CALL_DARWIN || defined __APPLE__\n #define TCG_TARGET_CALL_DARWIN\n #endif\n@@ -1418,6 +1416,8 @@ static const uint32_t qemu_exts_opc[4] = {\n };\n \n #if defined (CONFIG_SOFTMMU)\n+#include \"tcg-ldst.inc.c\"\n+\n /* helper signature: helper_ld_mmu(CPUState *env, target_ulong addr,\n * int mmu_idx, uintptr_t ra)\n */\ndiff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c\nindex 38b9e791ee..ee0dff995a 100644\n--- a/tcg/s390/tcg-target.inc.c\n+++ b/tcg/s390/tcg-target.inc.c\n@@ -24,8 +24,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-ldst.h\"\n-\n /* We only support generating code for 64-bit mode. */\n #if TCG_TARGET_REG_BITS != 64\n #error \"unsupported code generation mode\"\n@@ -1458,6 +1456,8 @@ static void tcg_out_qemu_st_direct(TCGContext *s, TCGMemOp opc, TCGReg data,\n }\n \n #if defined(CONFIG_SOFTMMU)\n+#include \"tcg-ldst.inc.c\"\n+\n /* We're expecting to use a 20-bit signed offset on the tlb memory ops.\n Using the offset of the second entry in the last tlb table ensures\n that we can index all of the elements of the first entry. */\ndiff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c\nindex 06cabbedf5..bb7f7e8906 100644\n--- a/tcg/sparc/tcg-target.inc.c\n+++ b/tcg/sparc/tcg-target.inc.c\n@@ -22,8 +22,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-null.h\"\n-\n #ifdef CONFIG_DEBUG_TCG\n static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {\n \"%g0\",\ndiff --git a/tcg/tcg-be-ldst.h b/tcg/tcg-ldst.inc.c\nsimilarity index 85%\nrename from tcg/tcg-be-ldst.h\nrename to tcg/tcg-ldst.inc.c\nindex 17777aec5a..0e14cf4357 100644\n--- a/tcg/tcg-be-ldst.h\n+++ b/tcg/tcg-ldst.inc.c\n@@ -20,8 +20,6 @@\n * THE SOFTWARE.\n */\n \n-#ifdef CONFIG_SOFTMMU\n-\n typedef struct TCGLabelQemuLdst {\n bool is_ld; /* qemu_ld: true, qemu_st: false */\n TCGMemOpIdx oi;\n@@ -35,19 +33,6 @@ typedef struct TCGLabelQemuLdst {\n struct TCGLabelQemuLdst *next;\n } TCGLabelQemuLdst;\n \n-typedef struct TCGBackendData {\n- TCGLabelQemuLdst *labels;\n-} TCGBackendData;\n-\n-\n-/*\n- * Initialize TB backend data at the beginning of the TB.\n- */\n-\n-static inline void tcg_out_tb_init(TCGContext *s)\n-{\n- s->be->labels = NULL;\n-}\n \n /*\n * Generate TB finalization at the end of block\n@@ -56,12 +41,12 @@ static inline void tcg_out_tb_init(TCGContext *s)\n static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l);\n static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l);\n \n-static bool tcg_out_tb_finalize(TCGContext *s)\n+static bool tcg_out_ldst_finalize(TCGContext *s)\n {\n TCGLabelQemuLdst *lb;\n \n /* qemu_ld/st slow paths */\n- for (lb = s->be->labels; lb != NULL; lb = lb->next) {\n+ for (lb = s->ldst_labels; lb != NULL; lb = lb->next) {\n if (lb->is_ld) {\n tcg_out_qemu_ld_slow_path(s, lb);\n } else {\n@@ -85,13 +70,9 @@ static bool tcg_out_tb_finalize(TCGContext *s)\n \n static inline TCGLabelQemuLdst *new_ldst_label(TCGContext *s)\n {\n- TCGBackendData *be = s->be;\n TCGLabelQemuLdst *l = tcg_malloc(sizeof(*l));\n \n- l->next = be->labels;\n- be->labels = l;\n+ l->next = s->ldst_labels;\n+ s->ldst_labels = l;\n return l;\n }\n-#else\n-#include \"tcg-be-null.h\"\n-#endif /* CONFIG_SOFTMMU */\ndiff --git a/tcg/tcg.c b/tcg/tcg.c\nindex 35598296c5..dd74eabb0a 100644\n--- a/tcg/tcg.c\n+++ b/tcg/tcg.c\n@@ -112,10 +112,9 @@ static bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val,\n static void tcg_out_call(TCGContext *s, tcg_insn_unit *target);\n static int tcg_target_const_match(tcg_target_long val, TCGType type,\n const TCGArgConstraint *arg_ct);\n-static void tcg_out_tb_init(TCGContext *s);\n-static bool tcg_out_tb_finalize(TCGContext *s);\n-\n-\n+#ifdef TCG_TARGET_NEED_LDST_LABELS\n+static bool tcg_out_ldst_finalize(TCGContext *s);\n+#endif\n \n static TCGRegSet tcg_target_available_regs[2];\n static TCGRegSet tcg_target_call_clobber_regs;\n@@ -470,8 +469,6 @@ void tcg_func_start(TCGContext *s)\n s->gen_op_buf[0].prev = 0;\n s->gen_next_op_idx = 1;\n s->gen_next_parm_idx = 0;\n-\n- s->be = tcg_malloc(sizeof(TCGBackendData));\n }\n \n static inline int temp_idx(TCGContext *s, TCGTemp *ts)\n@@ -2619,7 +2616,9 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)\n s->code_buf = tb->tc_ptr;\n s->code_ptr = tb->tc_ptr;\n \n- tcg_out_tb_init(s);\n+#ifdef TCG_TARGET_NEED_LDST_LABELS\n+ s->ldst_labels = NULL;\n+#endif\n \n num_insns = -1;\n for (oi = s->gen_op_buf[0].next; oi != 0; oi = oi_next) {\n@@ -2694,9 +2693,11 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)\n s->gen_insn_end_off[num_insns] = tcg_current_code_size(s);\n \n /* Generate TB finalization at the end of block */\n- if (!tcg_out_tb_finalize(s)) {\n+#ifdef TCG_TARGET_NEED_LDST_LABELS\n+ if (!tcg_out_ldst_finalize(s)) {\n return -1;\n }\n+#endif\n \n /* flush instruction cache */\n flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);\ndiff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c\nindex b6a15569f8..94461b2baf 100644\n--- a/tcg/tci/tcg-target.inc.c\n+++ b/tcg/tci/tcg-target.inc.c\n@@ -22,8 +22,6 @@\n * THE SOFTWARE.\n */\n \n-#include \"tcg-be-null.h\"\n-\n /* TODO list:\n * - See TODO comments in code.\n */\n", "prefixes": [ "PULL", "02/23" ] }