From patchwork Sat Mar 24 16:51:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 148516 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F1D8EB6EEF for ; Sun, 25 Mar 2012 03:51:49 +1100 (EST) Received: from localhost ([::1]:38750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBUBv-0004eI-PP for incoming@patchwork.ozlabs.org; Sat, 24 Mar 2012 12:51:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBUBf-0004UD-H5 for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBUBd-00055m-QQ for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:51:31 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:54133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBUBd-00054g-I2 for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:51:29 -0400 Received: by mail-iy0-f173.google.com with SMTP id j26so7261753iaf.4 for ; Sat, 24 Mar 2012 09:51:28 -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:x-mailer:in-reply-to :references; bh=lLvHw+qJYK4kWAjOmwI+/3YlRhHvrMoKabTyKd+0va0=; b=BNF/m1objJj07Z3VqbAtfit6vk5bvYwEo1ZpNZCUe/vVPwITNdcHKGa3VneeWs86P3 Obdn24anabnR/XA1IqjO0oPenTgVQVpwz1XwfALqJT9LB58dK1YoJqJllbQ3SZdB931W RBPAQ/jcH2wT3whk0qXwk3njYMQcYSxGZoeuDmCjbRWaK4duldnUlTU1WFZbmWP45n+j SodR2/3aDlzVNN/r0KIJcVskICrpOGR5B/MHNmIAcbOm9lTPSrYTUHXfChgru1w5IfrU HLrqqbkXMVhg5juexkJkoVQMsQST+BOmp2kfucSncwEsRSvEBGPkwi9/ypDL/WY7UEMX NxaQ== Received: by 10.68.129.74 with SMTP id nu10mr38717927pbb.157.1332607888539; Sat, 24 Mar 2012 09:51:28 -0700 (PDT) Received: from pebble.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id q8sm8412101pbi.1.2012.03.24.09.51.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Mar 2012 09:51:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 24 Mar 2012 09:51:10 -0700 Message-Id: <1332607875-18895-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1332607875-18895-1-git-send-email-rth@twiddle.net> References: <1332607875-18895-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.173 Cc: blauwirbel@gmail.com Subject: [Qemu-devel] [PATCH 05/10] target-alpha: Move fpcr helpers from op_helper.c to helper.c. 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson --- target-alpha/helper.c | 14 ++++++++++++-- target-alpha/helper.h | 4 ++-- target-alpha/op_helper.c | 10 ---------- target-alpha/translate.c | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index 584457f..3333bfa 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -159,9 +159,19 @@ void cpu_alpha_store_fpcr (CPUAlphaState *env, uint64_t val) env->fpcr_undz = (val & FPCR_UNDZ) != 0; } +uint64_t helper_load_fpcr(CPUAlphaState *env) +{ + return cpu_alpha_load_fpcr(env); +} + +void helper_store_fpcr(CPUAlphaState *env, uint64_t val) +{ + cpu_alpha_store_fpcr(env, val); +} + #if defined(CONFIG_USER_ONLY) -int cpu_alpha_handle_mmu_fault (CPUAlphaState *env, target_ulong address, int rw, - int mmu_idx) +int cpu_alpha_handle_mmu_fault(CPUAlphaState *env, target_ulong address, + int rw, int mmu_idx) { env->exception_index = EXCP_MMFAULT; env->trap_arg0 = address; diff --git a/target-alpha/helper.h b/target-alpha/helper.h index d36df5f..e193c26 100644 --- a/target-alpha/helper.h +++ b/target-alpha/helper.h @@ -34,8 +34,8 @@ DEF_HELPER_FLAGS_1(pkwb, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64) DEF_HELPER_FLAGS_1(unpkbl, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64) DEF_HELPER_FLAGS_1(unpkbw, TCG_CALL_CONST | TCG_CALL_PURE, i64, i64) -DEF_HELPER_FLAGS_0(load_fpcr, TCG_CALL_CONST | TCG_CALL_PURE, i64) -DEF_HELPER_FLAGS_1(store_fpcr, TCG_CALL_CONST, void, i64) +DEF_HELPER_FLAGS_1(load_fpcr, TCG_CALL_CONST | TCG_CALL_PURE, i64, env) +DEF_HELPER_FLAGS_2(store_fpcr, TCG_CALL_CONST, void, env, i64) DEF_HELPER_FLAGS_1(f_to_memory, TCG_CALL_CONST | TCG_CALL_PURE, i32, i64) DEF_HELPER_FLAGS_1(memory_to_f, TCG_CALL_CONST | TCG_CALL_PURE, i64, i32) diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index 6711d99..59ee31e 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c @@ -43,16 +43,6 @@ uint64_t helper_load_pcc (void) #endif } -uint64_t helper_load_fpcr (void) -{ - return cpu_alpha_load_fpcr (env); -} - -void helper_store_fpcr (uint64_t val) -{ - cpu_alpha_store_fpcr (env, val); -} - uint64_t helper_addqv (uint64_t op1, uint64_t op2) { uint64_t tmp = op1; diff --git a/target-alpha/translate.c b/target-alpha/translate.c index a9b97a3..6f31b6d 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -2678,17 +2678,17 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) case 0x024: /* MT_FPCR */ if (likely(ra != 31)) - gen_helper_store_fpcr(cpu_fir[ra]); + gen_helper_store_fpcr(cpu_env, cpu_fir[ra]); else { TCGv tmp = tcg_const_i64(0); - gen_helper_store_fpcr(tmp); + gen_helper_store_fpcr(cpu_env, tmp); tcg_temp_free(tmp); } break; case 0x025: /* MF_FPCR */ if (likely(ra != 31)) - gen_helper_load_fpcr(cpu_fir[ra]); + gen_helper_load_fpcr(cpu_fir[ra], cpu_env); break; case 0x02A: /* FCMOVEQ */