[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding |
Date: |
Fri, 6 Mar 2009 16:36:01 +0100 |
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 <address@hidden>
---
target-ppc/translate.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index b5de33b..1ea3830 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -2416,9 +2416,10 @@ GEN_HANDLER(mtfsb1, 0x3F, 0x06, 0x01, 0x001FF800,
PPC_FLOAT)
}
/* 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);
@@ -2427,7 +2428,10 @@ GEN_HANDLER(mtfsf, 0x3F, 0x07, 0x16, 0x02010000,
PPC_FLOAT)
/* 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)) {
--
1.6.0.2
- [Qemu-devel] [PATCH 00/11] PPC64 Linux bringup patches v3, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 01/11] PPC64: Implement slbmte, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 02/11] PPC64: Implement large pages, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 05/11] PPC64: Nop some SPRs on 970fx, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 06/11] PPC64: Enable 64bit mode on interrupts, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding,
Alexander Graf <=
- [Qemu-devel] [PATCH 08/11] PPC64: Fix RFI(d), Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 11/11] PPC64: Disable BAT for 970, Alexander Graf, 2009/03/06
- Re: [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU, Hollis Blanchard, 2009/03/06
- Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit, Hollis Blanchard, 2009/03/06
- Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit, Alexander Graf, 2009/03/06
- [Qemu-devel] Re: [PATCH 01/11] PPC64: Implement slbmte, Blue Swirl, 2009/03/07
- [Qemu-devel] Re: [PATCH 00/11] PPC64 Linux bringup patches v3, Blue Swirl, 2009/03/07