From patchwork Tue Jan 17 23:10:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 643419 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp1443191pvb; Tue, 17 Jan 2023 15:12:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXv6C5aPJcNn9WFcTbByahbiSOyLN20EIJEb2NQdQJ3wSEhVX4I9JIxhef4Ku4Obt94W0Ycv X-Received: by 2002:a05:6214:360c:b0:534:6cae:d7c6 with SMTP id nv12-20020a056214360c00b005346caed7c6mr8090179qvb.33.1673997142679; Tue, 17 Jan 2023 15:12:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673997142; cv=none; d=google.com; s=arc-20160816; b=lqJD7rbjwPw934ze5FEPsNwhrIvF33MYudBzupTd6tHt6NINySx5DM1+xv9R2TNjDN pQd6uproA12tqK7wifftztepQs7pTs+2HoQ5rv4GBgI0wzm1U77fWucv5C5hOT01bmHU PQwqnlQZBkrUQQ0E29LIhUMOl/slRm1d/Giy+tE5Z7cVaaoO+7YyU/C6zhwcs4rX+mVg tmYbHT98/+sLS6khzvDW+dwW6QKDmEWJNd+/m5Zo5a03sRei5+Fg0EXhuAV78iwF/9Ry Q8xYg9QwG+lkGzy4CowonJAd5a39+Ph40sQpjYzIZveji1d5Zpl5bg/+GBLCRBbjRGpZ PXhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+1eHDtP5R1nPjuMRuGqQtKv92UmnswK6x6In6/r9/IU=; b=c3xeKDvptZ07P9UloB8N9yXwig4e71dOwRtShKp3+vLgbAZOZWv6lPcznO4oCqA23B LAG6f5zx4pp1CXlejNIZh+yKYy51e0pOz3eAjyX4VqHCk3d/4EMIIVRJK3AXLrshD6IW SU15522xUK2h3FyWTRGYzbMD3lnizxHj9e2gKcmhcMh/0gULnkZiF2ZFq2YrWu0Vd7+w ofM2n4gKMcxKWQdtPKqXmdblalA4ouDvxBZ6s0lTzl7v/3J5qWzKJilVou2fafHhFMpo vf3bsBgh5orrB/8VqrQ2Sf8K4H3kz99CE/vetWNk+xc4nLLAoyrWe0CMEaGaf02eNLSi fY3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EK1OQ2Ds; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g28-20020a05620a109c00b006ffa70f98afsi14197058qkk.81.2023.01.17.15.12.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jan 2023 15:12:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EK1OQ2Ds; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHv6k-0003Q7-Cg; Tue, 17 Jan 2023 18:11:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHv6b-0003Jt-OT for qemu-devel@nongnu.org; Tue, 17 Jan 2023 18:11:03 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHv6a-0001IT-2T for qemu-devel@nongnu.org; Tue, 17 Jan 2023 18:11:01 -0500 Received: by mail-pg1-x52b.google.com with SMTP id b12so23194882pgj.6 for ; Tue, 17 Jan 2023 15:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+1eHDtP5R1nPjuMRuGqQtKv92UmnswK6x6In6/r9/IU=; b=EK1OQ2DsOmxc6YYzDsnqkGG2df8irUBLoZZ74XJ69el9I4NC6iLPEKZX6l3IdMiYAT 7uBWIDym09cf2GDcFrvnTX2UJDxz1NgdZhuWsZnzSCmNLLH15cxcAJvEPBKm7wI/CBIP 0jSGBCgujVAFrWxy6rJT6wFBJm/tME3yMOSAihM+7GCiuUS5OtBDSJySLOVFmEvK1Zre TTru3TLE9huLOWP+kj+B6a6qUmWdQtGXvvxIFrAaYmPV7H5MhIrK3lTdoD5z7genBrDM Z6b23e0+3vPw62dkAwYpvUKgYxdnn231h4i7XJ5VHDnAQKKLgM1FyyTRqcgeUQTI8R56 ApJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+1eHDtP5R1nPjuMRuGqQtKv92UmnswK6x6In6/r9/IU=; b=PIhA6CLo0m45JUTKmBlOCSDTJu27Gtdl1huoKV28ogy5nj8CgTGyI4ovr6ux7PCTj0 xBGr+cWVb1Vk01mw3aD+CdQMRaWtH8KMtw7wpKa0DW/VAeTA04ukCi/0ZkPo9vfj6Rub A510L/TpEljyGezDe1POAlFLSm0k5ZLa+VAH723uV736ApnbXZ8tYo89p3S2+8w7cgVg 1A7OPRRFnOmo6EFe+wgiPS2EW5L4sDWNcm6NDUJWxLkplg9eeSbTwwmNs7E03BxJTntd Z3RT5uO+5h/4cVMoJxrkGRqXb+CtTbaXWpnDDaoLOI8/a2F9vtErPn2v9Ga+xdWLa+hA F7Fw== X-Gm-Message-State: AFqh2kopyZw0dUTpf/n+wTV9PNvCTzyvj5IWyBI8CE6N57x3yzcgg8oj qoA/Y6+3yOL33jEh4wRHlNqT+FesbIFsrv+g X-Received: by 2002:aa7:880b:0:b0:58d:abd5:504a with SMTP id c11-20020aa7880b000000b0058dabd5504amr4569396pfo.31.1673997058459; Tue, 17 Jan 2023 15:10:58 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id b193-20020a621bca000000b005810c4286d6sm20747070pfb.0.2023.01.17.15.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:10:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 02/22] tcg/i386: Remove unused goto_tb code for indirect jump Date: Tue, 17 Jan 2023 13:10:31 -1000 Message-Id: <20230117231051.354444-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230117231051.354444-1-richard.henderson@linaro.org> References: <20230117231051.354444-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index feb257db01..c4ff59e9ee 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -2383,23 +2383,19 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, switch (opc) { case INDEX_op_goto_tb: - if (s->tb_jmp_insn_offset) { - /* direct jump method */ - int gap; - /* jump displacement must be aligned for atomic patching; + qemu_build_assert(TCG_TARGET_HAS_direct_jump); + { + /* + * Jump displacement must be aligned for atomic patching; * see if we need to add extra nops before jump */ - gap = QEMU_ALIGN_PTR_UP(s->code_ptr + 1, 4) - s->code_ptr; + int gap = QEMU_ALIGN_PTR_UP(s->code_ptr + 1, 4) - s->code_ptr; if (gap != 1) { tcg_out_nopn(s, gap - 1); } tcg_out8(s, OPC_JMP_long); /* jmp im */ s->tb_jmp_insn_offset[a0] = tcg_current_code_size(s); tcg_out32(s, 0); - } else { - /* indirect jump method */ - tcg_out_modrm_offset(s, OPC_GRP5, EXT5_JMPN_Ev, -1, - (intptr_t)(s->tb_jmp_target_addr + a0)); } set_jmp_reset_offset(s, a0); break;