From nobody Wed Nov 5 18:27:49 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496682331925895.4573633667363; Mon, 5 Jun 2017 10:05:31 -0700 (PDT) Received: from localhost ([::1]:34409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvRY-0000ew-Df for importer@patchew.org; Mon, 05 Jun 2017 13:05:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHvFc-0004nL-NH for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHvFX-0003wa-4m for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:08 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:35033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHvFX-0003w9-0m for qemu-devel@nongnu.org; Mon, 05 Jun 2017 12:53:03 -0400 Received: by mail-qt0-x243.google.com with SMTP id x58so9854424qtc.2 for ; Mon, 05 Jun 2017 09:53:02 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2602:47:d954:1500:5e51:4fff:fe40:9c64]) by smtp.gmail.com with ESMTPSA id c6sm1637044qtb.56.2017.06.05.09.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 09:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=qKkRSYH8KQ6kF7pRf4T5NFHb6pAgyfU5JGm5Tjs0Cww=; b=Fg4kU3gmTrV2KWVVEzh5AR3x05JTrhJ+f7B+FUfKnqOe+fRUTmGqfNA2e9lfxL2wBg OwRR/+nm8RaFjRzF2DHKr7G9PSjzfNiPw9ssFKbSVE0aPCdAQR8vRSWdA2TCPkEESlL5 Mbn4+o/D5/OoKEhwHDDs/C8awLwULktDnEuLL1lBPYk2Oo66pDYzlkGC38pML5NSBZRm tIBhflFC2Mm7KVxxSYpwMU7W8vCUkk+erNIAbCGaHshI/uJLFyK4ukilEoHkEx7Kf+dB y7FjFQQhBMaswGLOCbg74vca55/Byb/Xo0u5loCYy1G1oKmaCTh4Xx4MWFB3huyDnrTE 0JQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=qKkRSYH8KQ6kF7pRf4T5NFHb6pAgyfU5JGm5Tjs0Cww=; b=TwSKTRNLJeGdMy12HzUKBslIdaLuO0oYmt0M+l7uK2FlJWLo/f+EP9tvA277TpuFMQ HhCzBdE9WOJYCTnuCvULQuGhCg33a+ree0zejjTUgCsPpYuHtE9fQOEPE/f7DMy+TUaT 0VizUhPa0Ki1WCjxv8do5EvlOP/RAyPVI7051VgaYcVOrgUGlSPiues3TgmgW5JB72rg 08OrXk6XW98Yr977TG7T50UjdC4FSaiIQXljCuz2eS1oLAcIu9vLtfeHVxjb3wXw3w2V xGplj6JRWjfpRQ/Jy2MWYEQj/gRfLOI6ZjTgq3z+Q2pFCbfVwEz1HPZdULummnK2l5RE PInQ== X-Gm-Message-State: AODbwcB+/ozovD6xHt92vOn3pRF9BSr2ZmfkOfrmVr/ybCcjm0b3WCcW 6hlKBvXuhALgJAhiTmY= X-Received: by 10.237.46.66 with SMTP id j60mr7084926qtd.149.1496681582281; Mon, 05 Jun 2017 09:53:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 5 Jun 2017 09:52:26 -0700 Message-Id: <20170605165233.4135-20-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170605165233.4135-1-rth@twiddle.net> References: <20170605165233.4135-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PULL 19/26] target/s390: Use tcg_gen_lookup_and_goto_ptr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Tested-by: Aurelien Jarno Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/translate.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4c48c59..628fb86 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -608,11 +608,16 @@ static void gen_op_calc_cc(DisasContext *s) set_cc_static(s); } =20 -static int use_goto_tb(DisasContext *s, uint64_t dest) +static bool use_exit_tb(DisasContext *s) { - if (unlikely(s->singlestep_enabled) || - (s->tb->cflags & CF_LAST_IO) || - (s->tb->flags & FLAG_MASK_PER)) { + return (s->singlestep_enabled || + (s->tb->cflags & CF_LAST_IO) || + (s->tb->flags & FLAG_MASK_PER)); +} + +static bool use_goto_tb(DisasContext *s, uint64_t dest) +{ + if (unlikely(use_exit_tb(s))) { return false; } #ifndef CONFIG_USER_ONLY @@ -5461,8 +5466,10 @@ void gen_intermediate_code(CPUS390XState *env, struc= t TranslationBlock *tb) /* Exit the TB, either by raising a debug exception or by return. = */ if (do_debug) { gen_exception(EXCP_DEBUG); - } else { + } else if (use_exit_tb(&dc)) { tcg_gen_exit_tb(0); + } else { + tcg_gen_lookup_and_goto_ptr(psw_addr); } break; default: --=20 2.9.4