From patchwork Sat Jul 10 15:31:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 472352 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1368561jao; Sat, 10 Jul 2021 08:44:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz41QKJmcBvLrC4ve5mTP7wfAU8NcKXSAVzg9G6+UVxKD48Wb+tdWmwRfIU4GUmM4nrNeuB X-Received: by 2002:ad4:40c1:: with SMTP id x1mr42396629qvp.33.1625931851597; Sat, 10 Jul 2021 08:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625931851; cv=none; d=google.com; s=arc-20160816; b=x+rrIiq6CNoaXlTb5zMVhlMByWC5DRq8yvih1/hBZxTpwalj2ZZjJ8EVpL1mWVZO9h nipm27EP0lVbTMR4KyrIIO1b4Ti1xTy3nnIam9Px5dfvIpTTZffOy4SYZE3vzDBrzEiS OCZee3+KQi+qdlJAN1D10znPDAJJewrQsZPK+Obu1H7dq6iySCx+5R/vxWkIos4LI4d1 LMke+GuUE30mYMnZYhiVi2L+n52reRMou5XjWHMCo0LkgU8sHXjsYzz9byS2W98ZjqoO G6PbSlVUFaQ8Z7n/y39WCFviGUVzF5RBJIzmyHyYfZQq8sOqMK7gW0KvTiEvO5YUVhos aIcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=wgZhcSy8wA9T7RvUf4moyrqBuAXS045DsDPF940MlKs=; b=ljV25vDWcK6X82Ed/etv9Cp68S6we41nJE5WdyIRBNp34s9GHVrgRqvBQGUUBtSCZU tpphHfrHcumsqQ2NLiOyZ/T4nBH2oNAOvTIHy+z//ugwe8q0Wdc8wYNeSqwUG5NSGblh qiZR8zcGQW7PvYd7I5MsovXyLW3CEv2jP98MJcop1NLuJVCZmi9LWY1Udf2uew+8uAJU Rp9jjiVKxRQGFAFDmv1dBU9f+37wS0Hwn0XFMcSwO0zP3VbBRmQUZr8xtpaPK29ICUhW Fc2uOmMG0HPvG6TwtpEYP90xJYSvedbkWtL7kVeWextn1TfpiJHViZLj2DKkm+WbBiTZ QHDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UgyQSEEd; 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 f11si7750374qtv.339.2021.07.10.08.44.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jul 2021 08:44:11 -0700 (PDT) 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=UgyQSEEd; 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]:59768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2F9H-0005e6-1O for patch@linaro.org; Sat, 10 Jul 2021 11:44:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ExT-0005Qd-5i for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:59 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:55989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ExR-0002JR-MS for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:58 -0400 Received: by mail-pj1-x1033.google.com with SMTP id l11so7418876pji.5 for ; Sat, 10 Jul 2021 08:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wgZhcSy8wA9T7RvUf4moyrqBuAXS045DsDPF940MlKs=; b=UgyQSEEdU8Gle9tNrK/5kZJSrK28Hb7itWhRwryEUlQVoRakQp4xnZ6fYsTFMnlyC/ NdKI4yn04RoNHefaLdT2+awNFIvcPTM89IGIwMUtZO7Exto6IJR/cIM8pG/17z56xYCI 1FnIcpIe5wDd7/Cv6ZupUYuTq+EyMlCa6sZYzZQLoa4Q+Dy6EzkCeInRNc2mmvAUsWN1 giJiTRBgbCN4hd0L2N6Ol+8p0FiFJu884PrTDZXvR7VpsiW68GV3EQBFYitesoKNDVd2 LW2nRpmzkVxIDU6TqSDqUa4liwM3OVs+nhpq4wfLrNDGvwNYBmKKOhUw7kZX8IglaVY/ e/UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wgZhcSy8wA9T7RvUf4moyrqBuAXS045DsDPF940MlKs=; b=O2gB7bU6mYHvsm3q0ZCsWFWIxH0JLclQnu8jwlB9vMZO0upW+eRaNPRdE0dHJEMpKJ 4wlqv8oWom9c1cUtk1U1vGi5akr6xY6KA6ClNPYKYX3Txic5+/dy4Z0GcBizS3NzpWRT vz1w/+6ztxIGTXpiZQKEJm54Sga/JC/KhE4T37m5/GXYjiQsicz7yZVYkrvRAqIvisIT XhOsf9Aq3v4djnlByd/3N40ykBHJbHpi9uwfVTA94l6FVKQQzdtYvy8eqhu6OBMegMid EBDwG1siKmrvTW5uCEel0s1alLVN1a0GeHcsm7laRfFfDaq7p7BXxzv+XEkhYmW8l3lE q0Kg== X-Gm-Message-State: AOAM531TM1T9S3UQHZB5lggFDWtKoW/i1zVthCnytrzQ8L0LzJBAVTRR +bQcHC6TuH6Xe2JWpQ1vJunlJ0Fbck1qvA== X-Received: by 2002:a17:902:dad0:b029:129:c3fa:715 with SMTP id q16-20020a170902dad0b0290129c3fa0715mr17568018plx.45.1625931116388; Sat, 10 Jul 2021 08:31:56 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id u23sm11975374pgk.38.2021.07.10.08.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 08:31:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/41] target/i386: Use translator_use_goto_tb Date: Sat, 10 Jul 2021 08:31:19 -0700 Message-Id: <20210710153143.1320521-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210710153143.1320521-1-richard.henderson@linaro.org> References: <20210710153143.1320521-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Just use translator_use_goto_tb directly at the one call site, rather than maintaining a local wrapper. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 2.25.1 diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 85b00a6945..37a66b4097 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -2313,21 +2313,11 @@ static inline int insn_const_size(MemOp ot) } } -static inline bool use_goto_tb(DisasContext *s, target_ulong pc) -{ -#ifndef CONFIG_USER_ONLY - return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) || - (pc & TARGET_PAGE_MASK) == (s->pc_start & TARGET_PAGE_MASK); -#else - return true; -#endif -} - -static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) +static void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) { target_ulong pc = s->cs_base + eip; - if (use_goto_tb(s, pc)) { + if (translator_use_goto_tb(&s->base, pc)) { /* jump to same page: we can use a direct jump */ tcg_gen_goto_tb(tb_num); gen_jmp_im(s, eip);