* [Qemu-devel] [6753] Implement mtfsf.L encoding
@ 2009-03-07 20:55 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2009-03-07 20:55 UTC (permalink / raw)
To: qemu-devel
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 <alex@csgraf.de>
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)) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-07 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-07 20:55 [Qemu-devel] [6753] Implement mtfsf.L encoding Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).