From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lg3YT-00068y-Vu for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:55:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lg3YT-00068f-Do for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:55:33 -0500 Received: from [199.232.76.173] (port=46696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lg3YT-00068V-3F for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:55:33 -0500 Received: from savannah.gnu.org ([199.232.41.3]:37214 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lg3YS-0007us-HJ for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:55:32 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lg3YR-0003NH-Vi for qemu-devel@nongnu.org; Sat, 07 Mar 2009 20:55:32 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lg3YR-0003ND-Jp for qemu-devel@nongnu.org; Sat, 07 Mar 2009 20:55:31 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 07 Mar 2009 20:55:31 +0000 Subject: [Qemu-devel] [6753] Implement mtfsf.L encoding Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6753 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6753 Author: blueswir1 Date: 2009-03-07 20:55:31 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Implement mtfsf.L encoding Mtfsf can have the L bit set, so all the register contents get stored in FPSCR. Linux uses it, so let's implement it. Signed-off-by: Alexander Graf Modified Paths: -------------- trunk/target-ppc/translate.c Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2009-03-07 20:54:59 UTC (rev 6752) +++ trunk/target-ppc/translate.c 2009-03-07 20:55:31 UTC (rev 6753) @@ -2420,9 +2420,10 @@ } /* mtfsf */ -GEN_HANDLER(mtfsf, 0x3F, 0x07, 0x16, 0x02010000, PPC_FLOAT) +GEN_HANDLER(mtfsf, 0x3F, 0x07, 0x16, 0x00010000, PPC_FLOAT) { TCGv_i32 t0; + int L = ctx->opcode & 0x02000000; if (unlikely(!ctx->fpu_enabled)) { gen_exception(ctx, POWERPC_EXCP_FPU); @@ -2431,7 +2432,10 @@ /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); gen_reset_fpstatus(); - t0 = tcg_const_i32(FM(ctx->opcode)); + if (L) + t0 = tcg_const_i32(0xff); + else + t0 = tcg_const_i32(FM(ctx->opcode)); gen_helper_store_fpscr(cpu_fpr[rB(ctx->opcode)], t0); tcg_temp_free_i32(t0); if (unlikely(Rc(ctx->opcode) != 0)) {