[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [V3 PATCH 14/14] target-ppc: Add ISA2.06 lfiwzx Instruction
From: |
Tom Musta |
Subject: |
[Qemu-ppc] [V3 PATCH 14/14] target-ppc: Add ISA2.06 lfiwzx Instruction |
Date: |
Wed, 18 Dec 2013 14:49:07 -0600 |
This patch adds the Load Floating Point as Integer Word and
Zero Indexed (lfiwzx) instruction which was introduced in
Power ISA 2.06.
Signed-off-by: Tom Musta <address@hidden>
---
target-ppc/translate.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 0833606..cf1fb1b 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3524,6 +3524,20 @@ static void gen_lfiwax(DisasContext *ctx)
tcg_temp_free(t0);
}
+/* lfiwzx */
+static void gen_lfiwzx(DisasContext *ctx)
+{
+ TCGv EA;
+ if (unlikely(!ctx->fpu_enabled)) {
+ gen_exception(ctx, POWERPC_EXCP_FPU);
+ return;
+ }
+ gen_set_access_type(ctx, ACCESS_FLOAT);
+ EA = tcg_temp_new();
+ gen_addr_reg_index(ctx, EA);
+ gen_qemu_ld32u(ctx, cpu_fpr[rD(ctx->opcode)], EA);
+ tcg_temp_free(EA);
+}
/*** Floating-point store ***/
#define GEN_STF(name, stop, opc, type) \
static void glue(gen_, name)(DisasContext *ctx)
\
@@ -9937,6 +9951,7 @@ GEN_LDXF(name, ldop, 0x17, op | 0x00, type)
GEN_LDFS(lfd, ld64, 0x12, PPC_FLOAT)
GEN_LDFS(lfs, ld32fs, 0x10, PPC_FLOAT)
GEN_HANDLER_E(lfiwax, 0x1f, 0x17, 0x1a, 0x00000001, PPC_NONE, PPC2_ISA205),
+GEN_HANDLER_E(lfiwzx, 0x1f, 0x17, 0x1b, 0x00000001, PPC_NONE, PPC2_ISA206),
GEN_HANDLER_E(lfdp, 0x39, 0xFF, 0xFF, 0x00200003, PPC_NONE, PPC2_ISA205),
GEN_HANDLER_E(lfdpx, 0x1F, 0x17, 0x18, 0x00200001, PPC_NONE, PPC2_ISA205),
--
1.7.1
- [Qemu-ppc] [V3 PATCH 09/14] target-ppc: Add ISA 2.06 fcfid[u][s] Instructions, (continued)
- [Qemu-ppc] [V3 PATCH 09/14] target-ppc: Add ISA 2.06 fcfid[u][s] Instructions, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 10/14] target-ppc: Fix and enable fri[mnpz], Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 11/14] target-ppc: Add ISA 2.06 ftdiv Instruction, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 12/14] target-ppc: Add ISA 2.06 ftsqrt, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 13/14] target-ppc: Enable frsqrtes on Power7 and Power8, Tom Musta, 2013/12/18
- [Qemu-ppc] [V3 PATCH 14/14] target-ppc: Add ISA2.06 lfiwzx Instruction,
Tom Musta <=