From patchwork Thu Jun 2 05:56:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9149133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 80EF260467 for ; Thu, 2 Jun 2016 06:02:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 742D42654B for ; Thu, 2 Jun 2016 06:02:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68CDA269DA; Thu, 2 Jun 2016 06:02:54 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 147072654B for ; Thu, 2 Jun 2016 06:02:54 +0000 (UTC) Received: from localhost ([::1]:45356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8LiX-0007xa-4N for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Jun 2016 02:02:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Ldq-0004KQ-2w for qemu-devel@nongnu.org; Thu, 02 Jun 2016 01:58:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8Ldj-00035a-4Z for qemu-devel@nongnu.org; Thu, 02 Jun 2016 01:58:01 -0400 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:36759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Ldj-00035B-05 for qemu-devel@nongnu.org; Thu, 02 Jun 2016 01:57:55 -0400 Received: by mail-qk0-x243.google.com with SMTP id v3so936055qki.3 for ; Wed, 01 Jun 2016 22:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OTIOP4IPStiJuUlYWyzk3Z/VtQaDVGja3yTuu5JNmXg=; b=pA9pVOHm2vtewOdubOu2rhJ0pkW63BeMu+A1H1tDH0gfFoRVkF43pMxJEqm181058K vIJHfI9OscB+Ec+GNAyJBJpJZkgWjvwV0jLgrXliuzIHePKR3qDnyNj7VVnJqwPybXxc viqW1LXgeASv9bVcjYRhb9TEawk41JattmOZ8se3bShTmJ19G9J0hw24NagyEv17LqWs K5JpOFO//CIbmkVjtcQdyFOWeneT8dUtdMgevQelfFrJ4V9XrESWRyvw7VEECh8ZHNaF iDrzPC7u2xBk1ePNc14d1b7XeNKMs7mP866KQz0gCRi8pxmbqpmdVWtOHU/A/9piypCL waHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OTIOP4IPStiJuUlYWyzk3Z/VtQaDVGja3yTuu5JNmXg=; b=nBHNGCLtYJ7btYAn2uay1IUpza3G7rmIWjTvx9OI0d6bFDYwiwDeY31orDjNVzgYX/ nQGEXeebbW9VH0mHoAPi1eqYBftOyujqNcpNwMkJVqQFJ0YWDiAcLIkHFYgzl4rjZC1Z XRcVvDy3MLolaEavCsQ4lS2EEoMrSPM8RpKsO/md9B52CxQbJBwWpKLZxsx7F9xkmFTQ X/2a2+ytczfnx5uTxC65HDUNOxqup/WiT4t92cYWcQ7ETw+r3o153ZTFOdiWexmfgULM 2uEtidfwR/I8ezZQqSotlb+8qcuPsuP+WARIQumG0zibXnWBDcwRDp4ee09bt5OwrmW6 /lhQ== X-Gm-Message-State: ALyK8tJEULPG5ucRDzZKLFH3otcAdT70sJ5nS3hqR0layLuH0H5h+P/zgtUDsaYf06Ahkw== X-Received: by 10.233.235.83 with SMTP id b80mr23799400qkg.83.1464847074554; Wed, 01 Jun 2016 22:57:54 -0700 (PDT) Received: from anchor.com (71-37-54-227.tukw.qwest.net. [71.37.54.227]) by smtp.gmail.com with ESMTPSA id b10sm11631835qta.3.2016.06.01.22.57.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 22:57:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 1 Jun 2016 22:56:58 -0700 Message-Id: <1464847040-22536-3-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464847040-22536-1-git-send-email-rth@twiddle.net> References: <1464847040-22536-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH v3 02/24] target-sparc: Remove softint as a TCG global 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: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The global is only ever read for one insn; we can just as well use a load from env instead and generate the same code. This also allows us to indicate the the associated helpers do not touch TCG globals. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 6 +++--- target-sparc/translate.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target-sparc/helper.h b/target-sparc/helper.h index 366d4d1..14712cc 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -21,9 +21,9 @@ DEF_HELPER_4(ldda_asi, void, env, tl, int, int) DEF_HELPER_5(ldf_asi, void, env, tl, int, int, int) DEF_HELPER_FLAGS_5(stf_asi, TCG_CALL_NO_WG, void, env, tl, int, int, int) DEF_HELPER_FLAGS_5(casx_asi, TCG_CALL_NO_WG, tl, env, tl, tl, tl, i32) -DEF_HELPER_2(set_softint, void, env, i64) -DEF_HELPER_2(clear_softint, void, env, i64) -DEF_HELPER_2(write_softint, void, env, i64) +DEF_HELPER_FLAGS_2(set_softint, TCG_CALL_NO_RWG, void, env, i64) +DEF_HELPER_FLAGS_2(clear_softint, TCG_CALL_NO_RWG, void, env, i64) +DEF_HELPER_FLAGS_2(write_softint, TCG_CALL_NO_RWG, void, env, i64) DEF_HELPER_FLAGS_2(tick_set_count, TCG_CALL_NO_RWG, void, ptr, i64) DEF_HELPER_FLAGS_3(tick_get_count, TCG_CALL_NO_WG, i64, env, ptr, int) DEF_HELPER_FLAGS_2(tick_set_limit, TCG_CALL_NO_RWG, void, ptr, i64) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 21760b9..bfeef35 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -57,7 +57,6 @@ static TCGv_i32 cpu_xcc, cpu_asi, cpu_fprs; static TCGv cpu_gsr; static TCGv cpu_tick_cmpr, cpu_stick_cmpr, cpu_hstick_cmpr; static TCGv cpu_hintp, cpu_htba, cpu_hver, cpu_ssr, cpu_ver; -static TCGv_i32 cpu_softint; #else static TCGv cpu_wim; #endif @@ -2754,7 +2753,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) gen_store_gpr(dc, rd, cpu_gsr); break; case 0x16: /* Softint */ - tcg_gen_ext_i32_tl(cpu_dst, cpu_softint); + tcg_gen_ld32s_tl(cpu_dst, cpu_env, + offsetof(CPUSPARCState, softint)); gen_store_gpr(dc, rd, cpu_dst); break; case 0x17: /* Tick compare */ @@ -5360,7 +5360,6 @@ void gen_intermediate_code_init(CPUSPARCState *env) { &cpu_xcc, offsetof(CPUSPARCState, xcc), "xcc" }, { &cpu_asi, offsetof(CPUSPARCState, asi), "asi" }, { &cpu_fprs, offsetof(CPUSPARCState, fprs), "fprs" }, - { &cpu_softint, offsetof(CPUSPARCState, softint), "softint" }, #else { &cpu_wim, offsetof(CPUSPARCState, wim), "wim" }, #endif