From nobody Fri Dec 19 14:42:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1565962048; cv=none; d=zoho.com; s=zohoarc; b=OWry04+B0Nbzu0jHiReyQoUqVtE1QfwxjC+F4O3uY9Aqhw8JCUKtTlrH+MDfyRaXGH1fq+LFaiSDyu2h9axZV9pb7fYnICldleiBF2JOP3PHr84XfBCXFX5loJRSc1Hg8251n/8yt84u33yfLRDdZtTcJuko2tvY1GklLiXZDUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565962048; h=Content-Type:Content-Transfer-Encoding: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:ARC-Authentication-Results; bh=JW+EAPalvU8sJOK/3AzigF90RPDipGFjQ/LE5CWN+3s=; b=ADHqxHelczzGBIvbqmHQ3eeido2moRzx6KvpELgSkiIxBi7PPefLQq3j77VKxGMuO3GfaxmVmRnEE/BAukGyTc5VCB8TaLBhnLrGmrHfUTa6ypdLg7AOwSI+Ye/+/O0RHjWFum32gswEqGetfk3M9iy2rJVE1yFwHaAxv9T085E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565962048704259.32464787093295; Fri, 16 Aug 2019 06:27:28 -0700 (PDT) Received: from localhost ([::1]:56080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hycGK-0007RJ-90 for importer@patchew.org; Fri, 16 Aug 2019 09:27:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35296) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyc6u-0003Q3-0e for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyc6s-0005Y0-TW for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:39 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyc6s-0005Vz-NK for qemu-devel@nongnu.org; Fri, 16 Aug 2019 09:17:38 -0400 Received: by mail-wm1-x342.google.com with SMTP id v15so4027865wml.0 for ; Fri, 16 Aug 2019 06:17:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 4sm8705796wro.78.2019.08.16.06.17.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 06:17:35 -0700 (PDT) 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=JW+EAPalvU8sJOK/3AzigF90RPDipGFjQ/LE5CWN+3s=; b=KNu8Nx1wV+pwCGj4tkAS1H9yphYyfAMZHlL2Kpkea38Zq1iXTQUdZMHmP87m8sjZjw XN7/v1EQh48Do6ZQsh+yGVp8CAHmoToQIgU+Pcipmi7zFNc8/nQ1GgQMqIMi3jsJRpVD qSDE2heNVecCDkYbUd4jcd4gnLL+MoZS9WOfYa0FRYznvqyMLkMqIx5e9nF8/5lLupaJ DIBP1r1Oahiq3DcwFogODX03o/m6Bp3EhWF6V6OsIpyUEqs7rXv6iqVOImNTt5mllBm7 6jYK8bqwmZWe6jAC0i6QRBfiTI8QNmzLvaxxrHezUdd7EXMWNl1IAXy/3RiG1nhcqcBG i+RQ== 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=JW+EAPalvU8sJOK/3AzigF90RPDipGFjQ/LE5CWN+3s=; b=fd+Cw5qk4g3GXJuUfGIFVzDZAyeF4tUmWflouWoGH9dwoHpftLjB+ZE2DMzvlGWMpj m99jXdqkd7edMsE5+ZwUBtqz2xRJLxU7TXokOLyrR2CYRr0G/C/+YOqrViTURVmfoyDL qUevSjYOnRCsLDnwWxA1iwmc8ndF1aLwdGU4HxeMsaYtP58/nA6/Mz2uH3k+5TRl5IDz 0KZ5spbDQ2UpnRekUNoRQ8UzkiFAJu+s5tSt2euWwGqzTskJ0WrnTk9CuSv+tQOt0WkL NdAHrj7JHS+qxbCpHUVMoQuoIYrad9G0vQ6gqTaZbDSvbT92XhAjViC3U4zSHuRIMQcd QFVg== X-Gm-Message-State: APjAAAUXID3lMotT0hlEYkzcBMkXw+QTrfsvcE3JstvvYcc198RSsz2S BSPh0CgMmhka5Pd1OYX5Ke1HD6OuD5w47A== X-Google-Smtp-Source: APXvYqxILMxTCEFSjzQrhnkCAV+DoLs3RQ43wUev9ZsWt9hEHqCvk5oQb+LA0y+JI5PCVUfzdSVp0A== X-Received: by 2002:a05:600c:ce:: with SMTP id u14mr7366248wmm.5.1565961456004; Fri, 16 Aug 2019 06:17:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 16 Aug 2019 14:17:04 +0100 Message-Id: <20190816131719.28244-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190816131719.28244-1-peter.maydell@linaro.org> References: <20190816131719.28244-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PULL 14/29] target/arm: Remove offset argument to gen_exception_bkpt_insn 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Richard Henderson Unlike the other more generic gen_exception{,_internal}_insn interfaces, breakpoints always refer to the current instruction. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190807045335.1361-10-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 7 +++---- target/arm/translate.c | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 2f8eea02e3b..55324333dab 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -268,12 +268,11 @@ static void gen_exception_insn(DisasContext *s, uint6= 4_t pc, int excp, s->base.is_jmp =3D DISAS_NORETURN; } =20 -static void gen_exception_bkpt_insn(DisasContext *s, int offset, - uint32_t syndrome) +static void gen_exception_bkpt_insn(DisasContext *s, uint32_t syndrome) { TCGv_i32 tcg_syn; =20 - gen_a64_set_pc_im(s->base.pc_next - offset); + gen_a64_set_pc_im(s->pc_curr); tcg_syn =3D tcg_const_i32(syndrome); gen_helper_exception_bkpt_insn(cpu_env, tcg_syn); tcg_temp_free_i32(tcg_syn); @@ -1900,7 +1899,7 @@ static void disas_exc(DisasContext *s, uint32_t insn) break; } /* BRK */ - gen_exception_bkpt_insn(s, 4, syn_aa64_bkpt(imm16)); + gen_exception_bkpt_insn(s, syn_aa64_bkpt(imm16)); break; case 2: if (op2_ll !=3D 0) { diff --git a/target/arm/translate.c b/target/arm/translate.c index c26d3376b3c..8bae0c39933 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1258,12 +1258,12 @@ static void gen_exception_insn(DisasContext *s, uin= t32_t pc, int excp, s->base.is_jmp =3D DISAS_NORETURN; } =20 -static void gen_exception_bkpt_insn(DisasContext *s, int offset, uint32_t = syn) +static void gen_exception_bkpt_insn(DisasContext *s, uint32_t syn) { TCGv_i32 tcg_syn; =20 gen_set_condexec(s); - gen_set_pc_im(s, s->base.pc_next - offset); + gen_set_pc_im(s, s->pc_curr); tcg_syn =3D tcg_const_i32(syn); gen_helper_exception_bkpt_insn(cpu_env, tcg_syn); tcg_temp_free_i32(tcg_syn); @@ -8140,7 +8140,7 @@ static void disas_arm_insn(DisasContext *s, unsigned = int insn) case 1: /* bkpt */ ARCH(5); - gen_exception_bkpt_insn(s, 4, syn_aa32_bkpt(imm16, false)); + gen_exception_bkpt_insn(s, syn_aa32_bkpt(imm16, false)); break; case 2: /* Hypervisor call (v7) */ @@ -11566,7 +11566,7 @@ static void disas_thumb_insn(DisasContext *s, uint3= 2_t insn) { int imm8 =3D extract32(insn, 0, 8); ARCH(5); - gen_exception_bkpt_insn(s, 2, syn_aa32_bkpt(imm8, true)); + gen_exception_bkpt_insn(s, syn_aa32_bkpt(imm8, true)); break; } =20 --=20 2.20.1