[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 18/29] target-ppc: Implement mtvsrws instruction
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 18/29] target-ppc: Implement mtvsrws instruction |
Date: |
Thu, 6 Oct 2016 23:03:04 +1100 |
From: Ravi Bangoria <address@hidden>
mtvsrws: Move To VSR Word & Splat
Signed-off-by: Ravi Bangoria <address@hidden>
Signed-off-by: Nikunj A Dadhania <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/translate/vsx-impl.inc.c | 19 +++++++++++++++++++
target-ppc/translate/vsx-ops.inc.c | 1 +
2 files changed, 20 insertions(+)
diff --git a/target-ppc/translate/vsx-impl.inc.c
b/target-ppc/translate/vsx-impl.inc.c
index 4120c01..23ec1e1 100644
--- a/target-ppc/translate/vsx-impl.inc.c
+++ b/target-ppc/translate/vsx-impl.inc.c
@@ -384,6 +384,25 @@ static void gen_mtvsrdd(DisasContext *ctx)
tcg_gen_mov_i64(cpu_vsrl(xT(ctx->opcode)), cpu_gpr[rB(ctx->opcode)]);
}
+static void gen_mtvsrws(DisasContext *ctx)
+{
+ if (xT(ctx->opcode) < 32) {
+ if (unlikely(!ctx->vsx_enabled)) {
+ gen_exception(ctx, POWERPC_EXCP_VSXU);
+ return;
+ }
+ } else {
+ if (unlikely(!ctx->altivec_enabled)) {
+ gen_exception(ctx, POWERPC_EXCP_VPU);
+ return;
+ }
+ }
+
+ tcg_gen_deposit_i64(cpu_vsrl(xT(ctx->opcode)), cpu_gpr[rA(ctx->opcode)],
+ cpu_gpr[rA(ctx->opcode)], 32, 32);
+ tcg_gen_mov_i64(cpu_vsrh(xT(ctx->opcode)), cpu_vsrl(xT(ctx->opcode)));
+}
+
#endif
static void gen_xxpermdi(DisasContext *ctx)
diff --git a/target-ppc/translate/vsx-ops.inc.c
b/target-ppc/translate/vsx-ops.inc.c
index c49ba6d..10eb4b9 100644
--- a/target-ppc/translate/vsx-ops.inc.c
+++ b/target-ppc/translate/vsx-ops.inc.c
@@ -28,6 +28,7 @@ GEN_HANDLER_E(mfvsrd, 0x1F, 0x13, 0x01, 0x0000F800, PPC_NONE,
PPC2_VSX207),
GEN_HANDLER_E(mtvsrd, 0x1F, 0x13, 0x05, 0x0000F800, PPC_NONE, PPC2_VSX207),
GEN_HANDLER_E(mfvsrld, 0X1F, 0x13, 0x09, 0x0000F800, PPC_NONE, PPC2_ISA300),
GEN_HANDLER_E(mtvsrdd, 0X1F, 0x13, 0x0D, 0x0, PPC_NONE, PPC2_ISA300),
+GEN_HANDLER_E(mtvsrws, 0x1F, 0x13, 0x0C, 0x0000F800, PPC_NONE, PPC2_ISA300),
#endif
#define GEN_XX1FORM(name, opc2, opc3, fl2) \
--
2.7.4
- [Qemu-ppc] [PULL 13/29] target-ppc: add lxvb16x instruction, (continued)
- [Qemu-ppc] [PULL 13/29] target-ppc: add lxvb16x instruction, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 14/29] target-ppc: add stxvb16x instruction, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 20/29] target-ppc/kvm: Add a wrapper function to check for KVM-PR, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 16/29] target-ppc: add vector compare not equal instructions, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 05/29] hw/ppc/spapr: Fix the selection of the processor features, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 01/29] spapr_vscsi: fix build error introduced by f19661c8, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 11/29] target-ppc: add lxvh8x instruction, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 21/29] target-ppc/kvm: Enable transactional memory on POWER8 with KVM-HV, too, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 19/29] MAINTAINERS: Add two more ppc related files, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 25/29] libqos: use generic qtest_shutdown(), David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 18/29] target-ppc: Implement mtvsrws instruction,
David Gibson <=
- [Qemu-ppc] [PULL 28/29] tests/pxe: Use -nodefaults to speed up ppc64/ipv6 pxe test, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 22/29] target-ppc: fix vmx instruction type/type2, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 06/29] ppc: Check the availability of transactional memory, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 27/29] spapr: fix check of cpu alias name in spapr_get_cpu_core_type(), David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 29/29] hw/ppc/spapr: Use POWER8 by default for the pseries-2.8 machine, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 12/29] target-ppc: add stxvh8x instruction, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 23/29] libqos: add PPC64 PCI support, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 09/29] target-ppc: improve lxvw4x implementation, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 17/29] target-ppc: add vclzlsbb/vctzlsbb instructions, David Gibson, 2016/10/06
- [Qemu-ppc] [PULL 26/29] tests: enable ohci/uhci/xhci tests on PPC64, David Gibson, 2016/10/06