From patchwork Tue Dec 6 04:16:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 631307 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2934069pvb; Mon, 5 Dec 2022 20:19:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf439yNg9hR84qyit4WrZ42WaAArv4vCmkyhkhIE5q4Jlm+3XVzsOVy5AY+MrYW3LN+AF2tI X-Received: by 2002:a0c:f212:0:b0:4c7:9c7:e6a4 with SMTP id h18-20020a0cf212000000b004c709c7e6a4mr30383418qvk.105.1670300399224; Mon, 05 Dec 2022 20:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670300399; cv=none; d=google.com; s=arc-20160816; b=xgeeIhEduoyk9HoK8IHeDH4abUkddtUonEOyH/O6ecsEPlueOZdadaJhApGucnK/Un Dn2CCu2COqpYkWktcasb6+m6lDRtnpygsDYCFlgcXofPZ1NFkK0Ymspw6T7ZofYJWowR /FpHeutY8GExP5hMzC7N2Head1vNIrM9yBxI/0VagpmLyok+RXV6vvxradkf9epJtDr0 mCbkH3/0EmoSsOLrK/fhe/YevLE+ycJAHHSzPu9dlPeexhZwRTN1SoBsyTz+rbjJ755n U7bBy+ig5sTU5G0WK6Iz3XVykzZEKvnqf26wL9CUjC37B3mkFdaAjwr7DzLK4jtjSLju lK+w== 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=dv7mKrORCdRv24tX0CJVaTCQqf4CXOzJEBkmuES7f0o=; b=SU99xmcKIt1cMFQyXcYDeaG/jqI/x/e2MNw2UKt7FHd+2HMB128qD/+Bcdd7L/onjz l8nsBsjn9WrlM/mwF3I5PDdRvPe58xhZLDQf549GOSwv63KomtjrJ49e4ybjYIimwvQV ZNRetBG1TiRz2FAfbaoiPwmgF/SxHzhG98lAYE09rZzmg5NlmMl/IZ03Sgg1yKVQIncJ ULeXs27/xmXNSPlrR8EOQ5cSDk7N7m9cdFWIkgh4oppxDE0gsUpvfhIifpcsaThsW8VX LeJd9sOkm6Bb5znn4WjX9VDFMbxOCP33axBxu25MouoXcXu2l6Fz4bHjkaz8fjXrgcGi jRpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V7LpB+dx; 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 x22-20020a05620a0b5600b006ee5b5b11ecsi8038714qkg.673.2022.12.05.20.19.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Dec 2022 20:19:59 -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=V7LpB+dx; 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 1p2POe-0003M7-4W; Mon, 05 Dec 2022 23:17:32 -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 1p2POZ-0003Kw-3d for qemu-devel@nongnu.org; Mon, 05 Dec 2022 23:17:27 -0500 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2POU-0006vs-Qn for qemu-devel@nongnu.org; Mon, 05 Dec 2022 23:17:25 -0500 Received: by mail-oi1-x229.google.com with SMTP id e205so15552669oif.11 for ; Mon, 05 Dec 2022 20:17:22 -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=dv7mKrORCdRv24tX0CJVaTCQqf4CXOzJEBkmuES7f0o=; b=V7LpB+dxdXWtOicbSSJkuIp5h/aGqKf9G7biuJ4534vKqSTaVho4iXcPLEqT2qnH8E ChYLUlA/emNCwF24tScx9Y34WEHOgfpFTpeCAp424nZxJv5BDiXfiZTCnv5NfNhFNFcG wjW23Zfwo+0IUG7E+6/RZ1HQUOpWzQFb2QTQ0z4A/JqS/Jlw6Z6/Kr1w0qwr6NK2WZk5 aO3VJDJ/T577R8VcrpQK09kdiulF/XiOaCtjU8mSRlHjbitGUczetGFnv2fLSB0baobp xtFHGnjpOrPodDFkesvJUNtOyttc636vdTZYO/sxbLgHRrmU5V9wozRW0+4SEJD8rgsg qveg== 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=dv7mKrORCdRv24tX0CJVaTCQqf4CXOzJEBkmuES7f0o=; b=3AUYh2P4RslAIEJjmdOzfcxTznA7yB8XVjPaIzm/9R7UJ+zdfACRZE5EyO5RpcmQad NIHcyU5laqEdP/zsE85J8Iy2vKOWkrYKt0Z8Gc9FiqnL7cs9SnJwYm8DY8N2ov9eQSWj eQTu9V1bFD4HdMGMCS2oIzrN4l5eL05V795jjvNim10MG7x5Y58Z5uFAkei3i9Ld3/KX cJKQcGNdPSnOPfa4Hhc+JfR/sgEMwt0Ol4PKs46KPeim4E9ZxOEYd6/zTW2iHiiEuGbz 9jG8o5tlWDPL4EcLaMM6PpFLNWFR58QVvvP/VELB/DSYjQ2odNvNIaKBoEErhl9gF9eb M7vA== X-Gm-Message-State: ANoB5pnBpNDyU4FCFYfZexN7RKOoo0i2ZxmwXu5a9qQbuEAslB2xikGK Ycg6I4lW+PVLlveb7JJmpIdaBEG0qO1o1y5tDlo= X-Received: by 2002:a54:4590:0:b0:35a:8ab0:70f0 with SMTP id z16-20020a544590000000b0035a8ab070f0mr32366731oib.272.1670300241259; Mon, 05 Dec 2022 20:17:21 -0800 (PST) Received: from stoup.. ([2806:102e:18:70b5:d104:21c2:8c7e:77e6]) by smtp.gmail.com with ESMTPSA id o35-20020a056870912300b0014185b2b3d5sm10162018oae.18.2022.12.05.20.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 20:17:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: r@hev.cc Subject: [PATCH 02/22] tcg/i386: Remove unused goto_tb code for indirect jump Date: Mon, 5 Dec 2022 22:16:55 -0600 Message-Id: <20221206041715.314209-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221206041715.314209-1-richard.henderson@linaro.org> References: <20221206041715.314209-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x229.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 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 5c20bedd20..f3a40fc428 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -2382,23 +2382,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;