From patchwork Wed Jun 30 18:32:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468736 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp626075jao; Wed, 30 Jun 2021 12:00:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytbDrd5FHF8hZ53EJtazqckP+aRxOfOdG3gS65TUIUsuTtz0HR7kuEZ7hOKXVn23Pk7PIZ X-Received: by 2002:a25:690e:: with SMTP id e14mr27869558ybc.277.1625079624872; Wed, 30 Jun 2021 12:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625079624; cv=none; d=google.com; s=arc-20160816; b=rhsNyyUN+jTSDChylorYVNVwnO9eMnJ8TXZhgoppZrcXFkuRLD+gsKUiCW+g4H2EVj 0is4x86o+tZ9xoaeYTqu2BMuQvuuDLCnNnlYjGfaUTWU3blnspX6UruVQ8gFpz1PYzNZ xbM8idhqM4bpdpH2kK1LvVeOjw74SIBJQlPJk+WaciX53NLzD7XYPSkjNT/nkQbpafkP jahVfXgawCu2UGSlG00kw0/laUaeEfyuLPbNCY/v/C5dSKMdN2LhoTSFUAdsx+7Un5t+ GnQy/O+wtiM/eoMb2H0KIhlY46CMBWzto6XTX3g+I6SGGAm3uyON0gHCP1wVUC7JGQSV zQXg== 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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=zsgmcTTRscCH4Ufv5MmN9juIWi9MxN2pI+yib56Ba8uSt/z0uuHAiO8blW69Jo/Ihv vDrXzKDXfE/qnC/wlBaCLp9OKaLWL0PkpCBLi31pAlgiFztCW4Qqo9yKSHOra0OsuiLg JQNOV9S32aPwAZz/z+hLU4IJBPPMxUZ8ZVlw0WsFiBUDzs7QL7DByn7XIbBEff2eiQD5 EtcHN1uf/cXxy+d5Wxqj9flZ/vsEQT8RPZ5Qq8Z3Fxh+zIyxiItXINK/GnI9e7N0v+Qk 8DHT4hR50B8ir69U4inBsXO3SkRv/Me/+7t0NqrItozLDTK3EdfZ/0NP0OuAZduBCno6 NoTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyIoG7fq; 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 y14si18755591ybg.154.2021.06.30.12.00.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jun 2021 12:00:24 -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=PyIoG7fq; 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]:50350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyfRg-0002Gt-4a for patch@linaro.org; Wed, 30 Jun 2021 15:00:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyf0t-0005WF-5b for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:43 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:45759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyf0p-00024h-MT for qemu-devel@nongnu.org; Wed, 30 Jun 2021 14:32:42 -0400 Received: by mail-pj1-x1036.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso1983305pjb.4 for ; Wed, 30 Jun 2021 11:32:39 -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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=PyIoG7fqNcEfFFQ4gNjJia2QzE6oMaOP97nFiokhYPZyiEz9+WinGExIM0Pxv2iWY4 0eRWmX+YannV1JkCm+iWDO61JsSo0eEvjlxsg3yWd4AlJ3dKWVZHaPJrUhv9wKqHR2rH 9SGi6m/7AHKcBLiWembfrdkutc1TKuhwnRWE9jidUdA0ghmtr6WgYlX/isyeMC9ahx0S UZNfllpFq7bcfYu0bDrM9DjIxOz+92Q0KFPACUCjcnSLW2X27lCYH+7iBjScX+ZE+Dzn aUgza9k6z1eYXPOu/diW0UhE23qN4d3uOKT6RL0NNVAdR/iBJc0HfARzDkW6lTE2qPXo CbDw== 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=zAnCrHtff6jPTMINAA/XQ8amtOalFE7ZmPKzxH7D+ug=; b=EIzLFvcdeL5Kywz4ksZTQ3UW6IAZ+jZLSEEdHH6FYdtWMd+9uiw74OcHQ+u9KAjack C26SqZMfqvdMgFTLF+KwcqtxYG/5rSbflkKffnc/lT/v/5x+r4tyDbpoOI3JJM9ryv+l O+E6dreMu5xwgW1s3U1rh1l+3ILvTIHiIU7tqy2SydhE7bF8TAFBabFsHj4mzsKG7kd4 f6qIXQKoJqFCq1h/H2bL6DgAqmOekOnY+J706virDAQfrm9QgOHdO+ppV2DP7QUMF3mX zAThamJhMWRu7wYXdymz/Y4Fm4cMiXsbuO6VaQka3gORD08podICjTt4ERywLsaMz57W oEZw== X-Gm-Message-State: AOAM532OmSWXA+42u5u7OZoq4dfbPwgJdbTyCDY21VhHiMzas4mlP6SP z0194Zmpp7GgNnIEi0M/nOkAL0llXOLBGA== X-Received: by 2002:a17:902:8ec7:b029:119:a15f:3a1c with SMTP id x7-20020a1709028ec7b0290119a15f3a1cmr33701713plo.48.1625077958425; Wed, 30 Jun 2021 11:32:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id m18sm23909517pff.88.2021.06.30.11.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 11:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 18/28] target/openrisc: Use translator_use_goto_tb Date: Wed, 30 Jun 2021 11:32:16 -0700 Message-Id: <20210630183226.3290849-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630183226.3290849-1-richard.henderson@linaro.org> References: <20210630183226.3290849-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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: Stafford Horne Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reorder the cases in openrisc_tr_tb_stop to make this easier to read. Cc: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.25.1 Reviewed-by: Stafford Horne diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index a9c81f8bd5..2d142d8577 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1720,16 +1720,17 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) /* fallthru */ case DISAS_TOO_MANY: - if (unlikely(dc->base.singlestep_enabled)) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - gen_exception(dc, EXCP_DEBUG); - } else if ((dc->base.pc_first ^ jmp_dest) & TARGET_PAGE_MASK) { - tcg_gen_movi_tl(cpu_pc, jmp_dest); - tcg_gen_lookup_and_goto_ptr(); - } else { + if (translator_use_goto_tb(&dc->base, jmp_dest)) { tcg_gen_goto_tb(0); tcg_gen_movi_tl(cpu_pc, jmp_dest); tcg_gen_exit_tb(dc->base.tb, 0); + break; + } + tcg_gen_movi_tl(cpu_pc, jmp_dest); + if (unlikely(dc->base.singlestep_enabled)) { + gen_exception(dc, EXCP_DEBUG); + } else { + tcg_gen_lookup_and_goto_ptr(); } break;