From patchwork Tue Feb 5 17:04:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 157488 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5428435jaa; Tue, 5 Feb 2019 09:26:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IZLJnfi/8PEt8GOtjGZhOkCwOcIIYnFAet9lbYPrd9OoWZS4lODQJ4sswlAkBJA/Oirxosi X-Received: by 2002:a0d:e4c5:: with SMTP id n188mr4805687ywe.349.1549387593374; Tue, 05 Feb 2019 09:26:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549387593; cv=none; d=google.com; s=arc-20160816; b=LkISkXB2/LUudoJtYQ2XTd5a/hrf0Z3A572R7/xDJ0eCa999yI7MnnQpWSE5LoJYIl 2lcmuTsrVtYR8DN8MkaDvShlj5RXwBexF8y0ofNzlTVnY2+rf7P33wbxFAD79pWbZk2N lFURbDM4iuOZfFBVk77xR1c3VcmkfA+gTJqOngW33IlEHHAvV7nn7J3GdMbRtXgtVlyM 5vQSFiy5xuzLG17qleOX4EXNvtrCehU6noLhfOmo2w+YdGzz8jTUhSEMLn3MHyzrh/g4 JSC9zrAiBEqhS4CPsCPQETb/1LoUVJkp70RS+0i/6I2AHju71Wy2zuHyV3yg4K2zLugH 6Rtw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=9X8i6rJyojdujGPcmE2h9DlEiaHjqsSnLuQBqIb/J/k=; b=XK22DEiZvwVB7US7wfcW3IiO8ogrFRoxel/nULzt+YHKQtQivUcaFciqvLzprAIcEC 3BpUJEjvGXfd5zf1RTeaeV5NbEpsIir8Rsz6g4i1QE01ACDjGVFAwPbc8LQCciLHMgZL NbxZKpFtgqQjwHlaX1dBbMjTc3Z/5YRgDUKOuGsfbNZ/u1OXY3qL+yoJFlTrtLIij3iT UUAtjH0elNx0jGKPg3aQQD86j44tVi1c/316Jwqmzn2nZsajLG0eIcxMo1x4FKE+wzZh 0TU+GbV5yc2pbUHsoYT2VfWuGO/9+a/aIcoyK+VZ4TqbZYn9LNcspIJN1dTA+YR/0FzB 75cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="hDCcyf/h"; 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=fail (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 p12si2322411ywg.432.2019.02.05.09.26.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 05 Feb 2019 09:26:33 -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=fail header.i=@linaro.org header.s=google header.b="hDCcyf/h"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:35444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr4US-0001QI-OX for patch@linaro.org; Tue, 05 Feb 2019 12:26:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr4AU-0001uf-HE for qemu-devel@nongnu.org; Tue, 05 Feb 2019 12:06:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr4AS-0000Zn-0H for qemu-devel@nongnu.org; Tue, 05 Feb 2019 12:05:54 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:51397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr4AR-0000Kr-Lr for qemu-devel@nongnu.org; Tue, 05 Feb 2019 12:05:51 -0500 Received: by mail-wm1-x32c.google.com with SMTP id b11so4469656wmj.1 for ; Tue, 05 Feb 2019 09:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9X8i6rJyojdujGPcmE2h9DlEiaHjqsSnLuQBqIb/J/k=; b=hDCcyf/hVrHi+L/zP3JVis0fb6wbXugEezkYyGGqALuqBpoWSaXOlc6RcZBblywubg TP0ekgjl2Ba6Q3ovxgRkokf2SwqUIHwRkyE+YV3MR4stfMtvcWNA2DE4Io2cG2TjhYG0 a5SddyGkKpRtZMRrGa/qRmjEAImeDznyPGUc7LKX7RxjE0rfBiPztcXbzJL2rUVcAd3t Gg8QjgoBlLlopo2N8h31BkXHvat6SZa8T+crlfSsRQJzjgMvm9RHcrmHqnsK7MIblKlw 6XvvQSO49OuHd6PhDP0BNRCSP46wAWezjY1gZpj+JnOzP7Ip3feZnSl/3znalYy9y/ub lOPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9X8i6rJyojdujGPcmE2h9DlEiaHjqsSnLuQBqIb/J/k=; b=d1J+yDy+o83oMqdAxX1Np2XuivYgD7bJKbyo7NAcF0Vqgd/culAiUHe3Jimlhd9iPJ U4rcdmwDLITAjrOeu+YxDdPoGjFwwjY3vX1ttQx4wGbHi9pQ+Gi4iKTfyN0MqB8NrdbB atWTNR6Wo6yTp02UN2TFlusILk7/rkXsuE6znDncSvb+0omny0CZG2TD6Qzd/IGwnwEG RypIJvueIxMeGGZZMcsCO5fJSrfSqzc3PMlfyALvv7PmL1oeKUCpsEtWnalJbk+TElYD lw65xBOIEEpdaLntwbQ2HFe8G6AemFCJbLY/7F6padsH1La+T7dvecbv6cSqv6uMNkov yC8Q== X-Gm-Message-State: AHQUAuZoH2X8bYyw+4XH6FwlT/2wpUFJQGD2ofe41s9ZxYi/IrWqiXDo SkjVZPW7NCa0a/VcGvBfLfPiqJgGCo2AdA== X-Received: by 2002:a1c:c181:: with SMTP id r123mr4563571wmf.8.1549386322926; Tue, 05 Feb 2019 09:05:22 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id w13sm5583164wmf.5.2019.02.05.09.05.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 09:05:22 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 17:04:55 +0000 Message-Id: <20190205170510.21984-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205170510.21984-1-peter.maydell@linaro.org> References: <20190205170510.21984-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c Subject: [Qemu-devel] [PULL 07/22] target/arm: Reset btype for direct branches 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This is all of the non-exception cases of DISAS_NORETURN. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20190128223118.5255-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 7034fb3d129..5d0341a6953 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1362,6 +1362,7 @@ static void disas_uncond_b_imm(DisasContext *s, uint32_t insn) } /* B Branch / BL Branch with link */ + reset_btype(s); gen_goto_tb(s, 0, addr); } @@ -1386,6 +1387,7 @@ static void disas_comp_b_imm(DisasContext *s, uint32_t insn) tcg_cmp = read_cpu_reg(s, rt, sf); label_match = gen_new_label(); + reset_btype(s); tcg_gen_brcondi_i64(op ? TCG_COND_NE : TCG_COND_EQ, tcg_cmp, 0, label_match); @@ -1415,6 +1417,8 @@ static void disas_test_b_imm(DisasContext *s, uint32_t insn) tcg_cmp = tcg_temp_new_i64(); tcg_gen_andi_i64(tcg_cmp, cpu_reg(s, rt), (1ULL << bit_pos)); label_match = gen_new_label(); + + reset_btype(s); tcg_gen_brcondi_i64(op ? TCG_COND_NE : TCG_COND_EQ, tcg_cmp, 0, label_match); tcg_temp_free_i64(tcg_cmp); @@ -1441,6 +1445,7 @@ static void disas_cond_b_imm(DisasContext *s, uint32_t insn) addr = s->pc + sextract32(insn, 5, 19) * 4 - 4; cond = extract32(insn, 0, 4); + reset_btype(s); if (cond < 0x0e) { /* genuinely conditional branches */ TCGLabel *label_match = gen_new_label(); @@ -1605,6 +1610,7 @@ static void handle_sync(DisasContext *s, uint32_t insn, * a self-modified code correctly and also to take * any pending interrupts immediately. */ + reset_btype(s); gen_goto_tb(s, 0, s->pc); return; default: