Received: from eggs.gnu.org ([2001:4830:134:3::10]:55460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WukKs-0001YS-LM for qemu-devel@nongnu.org; Wed, 11 Jun 2014 11:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WukKn-00049W-Q5 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 11:21:10 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:19759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WukKn-00049F-L2 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 11:21:05 -0400 From: Leon Alrae Date: Wed, 11 Jun 2014 16:19:48 +0100 Message-ID: <1402499992-64851-19-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1402499992-64851-1-git-send-email-leon.alrae@imgtec.com> References: <1402499992-64851-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 18/22] target-mips: do not allow Status.FR=0 mode in 64-bit FPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net Status.FR bit must be ignored on write and read as 1 when an implementation of Release 6 of the Architecture in which a 64-bit floating point unit is implemented. Signed-off-by: Leon Alrae --- target-mips/translate.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 4c75006..e635999 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -17899,6 +17899,13 @@ void cpu_state_reset(CPUMIPSState *env) } } #endif + if ((env->insn_flags & ISA_MIPS32R6) && + (env->active_fpu.fcr0 & (1 << FCR0_F64))) { + /* Status.FR = 0 mode in 64-bit FPU not allowed in R6 */ + env->CP0_Status |= (1 << CP0St_FR); + env->CP0_Status_rw_bitmask &= ~(1 << CP0St_FR); + } + compute_hflags(env); cs->exception_index = EXCP_NONE; } -- 1.7.5.4