From patchwork Mon Nov 3 16:11:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 406283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 35B9D14009F for ; Tue, 4 Nov 2014 03:28:05 +1100 (AEDT) Received: from localhost ([::1]:35844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKU7-0007tC-BE for incoming@patchwork.ozlabs.org; Mon, 03 Nov 2014 11:28:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKFG-0004YN-Nb for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlKFB-0005Zp-Du for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:42 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:51522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKFB-0005Ze-8s for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:37 -0500 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 7415F59EA2AFC for ; Mon, 3 Nov 2014 16:12:33 +0000 (GMT) Received: from virtUbuntuLTP.kl.imgtec.org (192.168.14.163) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 3 Nov 2014 16:12:35 +0000 From: Leon Alrae To: Date: Mon, 3 Nov 2014 16:11:32 +0000 Message-ID: <1415031108-15039-19-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1415031108-15039-1-git-send-email-leon.alrae@imgtec.com> References: <1415031108-15039-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.14.163] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: Yongbok Kim Subject: [Qemu-devel] [PULL 18/34] target-mips: remove duplicated mips/ieee mapping function 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 From: Yongbok Kim Remove the duplicated ieee_rm in gdbstub.c. Make the other ieee_rm and ieee_ex_to_mips available to other files. Reviewed-by: James Hogan Reviewed-by: Leon Alrae Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- target-mips/cpu.h | 4 ++++ target-mips/gdbstub.c | 7 ------- target-mips/op_helper.c | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index d08bbe7..d21da8e 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -760,6 +760,10 @@ hwaddr cpu_mips_translate_address (CPUMIPSState *env, target_ulong address, #endif target_ulong exception_resume_pc (CPUMIPSState *env); +/* op_helper.c */ +extern unsigned int ieee_rm[]; +int ieee_ex_to_mips(int xcpt); + static inline void cpu_get_tb_cpu_state(CPUMIPSState *env, target_ulong *pc, target_ulong *cs_base, int *flags) { diff --git a/target-mips/gdbstub.c b/target-mips/gdbstub.c index 5b72d58..f65fec2 100644 --- a/target-mips/gdbstub.c +++ b/target-mips/gdbstub.c @@ -73,13 +73,6 @@ int mips_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n) return 0; } -/* convert MIPS rounding mode in FCR31 to IEEE library */ -static unsigned int ieee_rm[] = { - float_round_nearest_even, - float_round_to_zero, - float_round_up, - float_round_down -}; #define RESTORE_ROUNDING_MODE \ set_float_rounding_mode(ieee_rm[env->active_fpu.fcr31 & 3], \ &env->active_fpu.fp_status) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 1b1c304..2a97721 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -2340,7 +2340,7 @@ void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr, #define FP_TO_INT64_OVERFLOW 0x7fffffffffffffffULL /* convert MIPS rounding mode in FCR31 to IEEE library */ -static unsigned int ieee_rm[] = { +unsigned int ieee_rm[] = { float_round_nearest_even, float_round_to_zero, float_round_up, @@ -2461,7 +2461,7 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt) do_raise_exception(env, EXCP_FPE, GETPC()); } -static inline int ieee_ex_to_mips(int xcpt) +int ieee_ex_to_mips(int xcpt) { int ret = 0; if (xcpt) {