Received: from eggs.gnu.org ([2001:4830:134:3::10]:49870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbovF-00079x-Ep for qemu-devel@nongnu.org; Wed, 08 Oct 2014 06:56:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xbov9-0002E9-3Z for qemu-devel@nongnu.org; Wed, 08 Oct 2014 06:56:45 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:4743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbov8-0002Dz-V4 for qemu-devel@nongnu.org; Wed, 08 Oct 2014 06:56:39 -0400 From: Leon Alrae Date: Wed, 8 Oct 2014 11:55:29 +0100 Message-ID: <1412765732-45369-19-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1412765732-45369-1-git-send-email-leon.alrae@imgtec.com> References: <1412765732-45369-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v4 18/21] 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: james.hogan@imgtec.com, 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 Reviewed-by: Yongbok Kim --- v3: * remove line modifying CP0_Status_rw_bitmask as this is done while defining CPU --- target-mips/translate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index 2edd36e..e5ae6b4 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -17951,6 +17951,12 @@ 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); + } + compute_hflags(env); cs->exception_index = EXCP_NONE; } -- 2.1.0