From patchwork Fri Jul 26 17:49:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 11061591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7364F13AC for ; Fri, 26 Jul 2019 17:51:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C96528AAE for ; Fri, 26 Jul 2019 17:51:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DFEC28AE3; Fri, 26 Jul 2019 17:51:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7202928AAE for ; Fri, 26 Jul 2019 17:51:10 +0000 (UTC) Received: from localhost ([::1]:42178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4N2-0003Si-Tv for patchwork-qemu-devel@patchwork.kernel.org; Fri, 26 Jul 2019 13:51:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57004) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4Mb-0001lW-7p for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr4Ma-0007IJ-8i for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:41 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:38249) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr4Ma-0007D6-2u for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:50:40 -0400 Received: by mail-pf1-x443.google.com with SMTP id y15so24860118pfn.5 for ; Fri, 26 Jul 2019 10:50:38 -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; bh=0JuwQx0rsSZ8qsmRHdUvrfpwMYNiERG9Y6tvmeQiWIA=; b=mdDlubgVyDpI0gBB/9wS4I3ZOTQgv4PpfZOk+KWeOqCkAjg83eDxHSixsyqM/xsBH/ BUVd6oQhdvo5O9aiW5mkGLz7dEIhy3r0ivcthlWlYuq4gGzBsfLKkHKBneIkiO919vcx t1WvOzaFxWjUepiRoMhwm5dfyd/rmBatVGkWj0EmEZAEC+syAvh0jVEbFIZmuA+YoA6t ysnYu1tw3IFx1kJynkc7h3HfJyre+u0vB8LD4He5RzXNQMnMiQlfcT2jvVgTb3AVFOfw y/ZcEUS0wdrLVSzBk/yeO36PMtHFp9rn7/FUPQRpmh53uzbZ+jZYm8uuGIhZtB1sk5lg sDDg== 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; bh=0JuwQx0rsSZ8qsmRHdUvrfpwMYNiERG9Y6tvmeQiWIA=; b=ffr9owdpy1THOs+hARYCoc8X4jsBDORmRC5DodLJbcTaaX9LYmZlWbBkd0l+zBsGpm A9UTEDG4CCA1RY3eeUjiDWfCYJjbXTYh3aa5UccM3aPOcu13zxbxZ1OQDlkVhjFP/q4e 8ShejMFIY64eOj11x0OjVQe6fqZTzmsFYMtTImp0Mu52kVHwCTOeJsBEZ3CfhaYinZ5c VGNkrZexU/Bsg9CERrIbBLmX0grd+iGk25ti9mygn/GyCSLG3Jmdul2WfImVVNN+z56/ 5P8Y2qLi8WddPqRuJfC1YXo2v02IL715fzYIRh5FljGT6vWMkr4vndpnqHXgfFeqYXbU 7c6g== X-Gm-Message-State: APjAAAUXdiiip2N6vUUj1a1A83wCiKcVGxYGemS8bSqPSUdiFsEvLNnV 7whWKJxx4AU24jCSfNUe4ogaRTgdPNY= X-Google-Smtp-Source: APXvYqwvTy4iDYLI8dksQMq4dUVkoUFdrcz7PpaveHPuTEiudndRV441C6L2lXW/dW7b2EFVS2Wx7Q== X-Received: by 2002:a17:90a:3463:: with SMTP id o90mr101503225pjb.15.1564163437889; Fri, 26 Jul 2019 10:50:37 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id o24sm104287919pfp.135.2019.07.26.10.50.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 10:50:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 10:49:28 -0700 Message-Id: <20190726175032.6769-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726175032.6769-1-richard.henderson@linaro.org> References: <20190726175032.6769-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH 03/67] 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: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The address of the current insn is still available in s->base.pc_next. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 33f78296eb..19b126d4f3 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1256,12 +1256,12 @@ static void gen_exception_insn(DisasContext *s, int excp, int syn, s->base.is_jmp = DISAS_NORETURN; } -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; gen_set_condexec(s); - gen_set_pc_im(s, s->pc - offset); + gen_set_pc_im(s, s->base.pc_next); tcg_syn = tcg_const_i32(syn); gen_helper_exception_bkpt_insn(cpu_env, tcg_syn); tcg_temp_free_i32(tcg_syn); @@ -8139,7 +8139,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) */ @@ -11611,7 +11611,7 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn) { int imm8 = 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; }