From patchwork Thu Feb 20 11:17:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25014 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C58E203BE for ; Thu, 20 Feb 2014 11:21:59 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id up15sf4205115pbc.3 for ; Thu, 20 Feb 2014 03:21:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=QM7ZZ5su6/ruvxoryy5qOZDvD3hEsv/U6ueHB3/8iZQ=; b=R4/MPiXTfCSX0+J49Q6/MBOAteGQ64Y8kBVlgveSLFC7e80qbDSSZrLKdJSj69GjZZ eBH4Xg29suS5DEO7IsCQ18MUGAaq6X+F+MdEWMRMkQ6azw4+5osPrqaGFsKFeM7SV8QD 6eTDUcnm4GsX2M8hlVFqUE360P+nh72b9TRX20XSrqRbq47b4MGyw6bmADaj/eTs4T+H bynZ/gF0CLdpLbqFHNmQSKfAYWWotcTgcweaigvn7YS76GnX8bDyK4/tpk/vyC9OVk32 ZCQBED9/uMUeGnyG5Oo6ApGQeZ+MydUT40QBj1ZOWKUKl3hDZHwwv2MVRJJU++Qg6drK pfCA== X-Gm-Message-State: ALoCoQnjpqZbYilU98hFwT+znwxH2RS2H3RrXSqzZKnOU0JlGmFuYZyejy3nS1x50pqqPJzjDtrC X-Received: by 10.66.166.199 with SMTP id zi7mr545141pab.30.1392895319103; Thu, 20 Feb 2014 03:21:59 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.71 with SMTP id c65ls486962qge.4.gmail; Thu, 20 Feb 2014 03:21:58 -0800 (PST) X-Received: by 10.52.29.113 with SMTP id j17mr600847vdh.22.1392895318945; Thu, 20 Feb 2014 03:21:58 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id l4si1335452vch.54.2014.02.20.03.21.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 03:21:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so1721273vea.3 for ; Thu, 20 Feb 2014 03:21:58 -0800 (PST) X-Received: by 10.220.225.71 with SMTP id ir7mr684926vcb.50.1392895318884; Thu, 20 Feb 2014 03:21:58 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp50327vcz; Thu, 20 Feb 2014 03:21:58 -0800 (PST) X-Received: by 10.140.82.175 with SMTP id h44mr761303qgd.68.1392895318223; Thu, 20 Feb 2014 03:21:58 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n21si3913028yho.48.2014.02.20.03.21.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Feb 2014 03:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:37559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGRhV-00085k-L6 for patch@linaro.org; Thu, 20 Feb 2014 06:21:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGReg-000401-12 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:19:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGRee-0004wa-MK for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:19:01 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGRee-0004wV-Fr for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:19:00 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WGRdH-0003UE-Rf; Thu, 20 Feb 2014 11:17:35 +0000 From: Peter Maydell To: Anthony Liguori Date: Thu, 20 Feb 2014 11:17:25 +0000 Message-Id: <1392895054-13232-22-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1392895054-13232-1-git-send-email-peter.maydell@linaro.org> References: <1392895054-13232-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 21/30] target-arm: Remove unnecessary code now read/write fns can't fail X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Now that cpreg read and write functions can't fail and throw an exception, we can remove the code from the translator that synchronises the guest PC in case an exception is thrown. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 2 -- target-arm/translate.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index e70d14f..ef305e3 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1231,7 +1231,6 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, tcg_gen_movi_i64(tcg_rt, ri->resetvalue); } else if (ri->readfn) { TCGv_ptr tmpptr; - gen_a64_set_pc_im(s->pc - 4); tmpptr = tcg_const_ptr(ri); gen_helper_get_cp_reg64(tcg_rt, cpu_env, tmpptr); tcg_temp_free_ptr(tmpptr); @@ -1244,7 +1243,6 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread, return; } else if (ri->writefn) { TCGv_ptr tmpptr; - gen_a64_set_pc_im(s->pc - 4); tmpptr = tcg_const_ptr(ri); gen_helper_set_cp_reg64(cpu_env, tmpptr, tcg_rt); tcg_temp_free_ptr(tmpptr); diff --git a/target-arm/translate.c b/target-arm/translate.c index 0805053..6ccf0ba 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -6876,7 +6876,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn) tmp64 = tcg_const_i64(ri->resetvalue); } else if (ri->readfn) { TCGv_ptr tmpptr; - gen_set_pc_im(s, s->pc); tmp64 = tcg_temp_new_i64(); tmpptr = tcg_const_ptr(ri); gen_helper_get_cp_reg64(tmp64, cpu_env, tmpptr); @@ -6899,7 +6898,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn) tmp = tcg_const_i32(ri->resetvalue); } else if (ri->readfn) { TCGv_ptr tmpptr; - gen_set_pc_im(s, s->pc); tmp = tcg_temp_new_i32(); tmpptr = tcg_const_ptr(ri); gen_helper_get_cp_reg(tmp, cpu_env, tmpptr); @@ -6934,7 +6932,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn) tcg_temp_free_i32(tmphi); if (ri->writefn) { TCGv_ptr tmpptr = tcg_const_ptr(ri); - gen_set_pc_im(s, s->pc); gen_helper_set_cp_reg64(cpu_env, tmpptr, tmp64); tcg_temp_free_ptr(tmpptr); } else { @@ -6945,7 +6942,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn) if (ri->writefn) { TCGv_i32 tmp; TCGv_ptr tmpptr; - gen_set_pc_im(s, s->pc); tmp = load_reg(s, rt); tmpptr = tcg_const_ptr(ri); gen_helper_set_cp_reg(cpu_env, tmpptr, tmp);