From nobody Tue Apr 15 23:03:50 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1625932205; cv=none; d=zohomail.com; s=zohoarc; b=dZqgB7RLy5ExoX9mVM8z0VH3l4f2xPygEfAkk/df2r5XpEeTSyD/XAYvDue65JxLTDhwsQblVvgtzNJahtPUDGW17LNrozHxYj2cV9TDXQ9xZ4bW9o2M58CA8upaRT0qDYjTEuqcB3jCsKE5NccsGOSkZa6jc+YjjuwUA0LFK5c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625932205; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=z0rbZYpLmN7OBA+o9g3ziAIPPJLFXElqgMaQw5pyuig=; b=XogVm8zmn8bWYs6rvzdMEXqRrvAQpb6FyatLlF2qbHmq7+mR+lSnfyMO+dqW46W71caeeQsd6VFJVbag/U5fDrOEq1QpJ1+IzTFzvEgBkQuCNICfz2E4++xurtAGcm8RA5K05709kG/CpRaSgktnwm21IWC1ncH9QyDU5cvF4TU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625932205978980.0437672510874; Sat, 10 Jul 2021 08:50:05 -0700 (PDT) Received: from localhost ([::1]:51884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2FEy-0002rJ-QB for importer@patchew.org; Sat, 10 Jul 2021 11:50:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ExY-0005j5-2N for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:32:04 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:55194) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ExW-0002MT-95 for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:32:03 -0400 Received: by mail-pj1-x1030.google.com with SMTP id g24so7415750pji.4 for ; Sat, 10 Jul 2021 08:32:01 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id u23sm11975374pgk.38.2021.07.10.08.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 08:32:00 -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=z0rbZYpLmN7OBA+o9g3ziAIPPJLFXElqgMaQw5pyuig=; b=AihVAPyrF8jDHZkbysV1bD4yuSHfwpcIOLJc1i3mJt8xoKLGJ7z2VeneNQlpbigOjL BwZLhzrZ/k0CjdYGYu/dCAhxGke9EAlc0ARhFh2LL4sFTVgocrY8UiJuWHZnmSPcXaT3 u19yX5ngeKvxjoBbIaQld1TDtZjV+cW9ZEr/1ulyo3+jHTEbCYmz8eF3Iyqylq831I05 Ae9cmGL0gdDZ17v8NSrRNSrRYlXZ/xZhWkuA2+QfEVrAyYcZ9SXJbg36usNDoLlJUL3J W6u1NUkGLMv9aIfov3mjtr2OfV8RTmjLcVuYVhEnZ9LQgQhBacC3UN2Rq1ADuUQyCJ4J 5oMQ== 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=z0rbZYpLmN7OBA+o9g3ziAIPPJLFXElqgMaQw5pyuig=; b=WWBfP4N21ot9Qwo5F/rHMLNEPpOeMmZ2xgByveo20v/RqscCNu6iW+wM9RGgRe9gCQ DQMdFN9ITBgsEiEdw+Y8rQDTlu6j0sebpr4BhwdefeXuN7HWkh2PkoRNtzl+YUZV48VL 4g7jpFRbLraYptqZL0f1HJvZFMXgqUMrvpSUR4Mqe/Rz0+dv7/xcfvDXwRSWRIchPOfb ycU3rp/1sf325EbKBCca30j2V82VEA752dj/Z+JFsdNCKqXzo3BZCnb74G9mCba7pBeM bxR98Jf7U4vlE6iGAyxezWeeqOuFSfhz4Bft15N959IRJqVvPvTJNIwknYNlfEXAbdIg avyA== X-Gm-Message-State: AOAM531u3SstK20+sBc+ape/QfZ76sIEn8tV4OnLM17UWvQuxoLVjFt6 QGv07ud6iQt1MzsBVPzhuKctSQLrue4n1g== X-Google-Smtp-Source: ABdhPJzDn+9rgmRu8xwbMjhPl39cBikrKH3CEGpsnMikPp6cWp79JnF/jJhPMDavatfLJgVu7sVcug== X-Received: by 2002:a17:902:f682:b029:128:e54c:f58a with SMTP id l2-20020a170902f682b0290128e54cf58amr35873297plg.13.1625931120956; Sat, 10 Jul 2021 08:32:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 23/41] target/openrisc: Use translator_use_goto_tb Date: Sat, 10 Jul 2021 08:31:25 -0700 Message-Id: <20210710153143.1320521-24-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1625932207721100001 Content-Type: text/plain; charset="utf-8" Reorder the control statements to allow using the page boundary check from translator_use_goto_tb(). Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 5db63d7609..37c3e3e0a3 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1719,16 +1719,17 @@ static void openrisc_tr_tb_stop(DisasContextBase *d= cbase, CPUState *cs) /* fallthru */ =20 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; =20 --=20 2.25.1