[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 11/28] target-ppc: Altivec 2.07: vmuluw Instruction
From: |
Tom Musta |
Subject: |
[Qemu-ppc] [PATCH 11/28] target-ppc: Altivec 2.07: vmuluw Instruction |
Date: |
Wed, 12 Feb 2014 15:23:02 -0600 |
This patch adds the Vector Multiply Unsigned Word Modulo (vmuluwm)
instruction.
The existing VARITH_DO macro is re-used to (trivially) instantiate
the helper code.
Since bits 21-31 of any vmuluwm instruction is 137, the instruction
is coded as a dual to vmulouw (bits 21-31 = 136).
Signed-off-by: Tom Musta <address@hidden>
---
target-ppc/helper.h | 1 +
target-ppc/int_helper.c | 1 +
target-ppc/translate.c | 5 ++++-
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/target-ppc/helper.h b/target-ppc/helper.h
index ca18447..c20d50e 100644
--- a/target-ppc/helper.h
+++ b/target-ppc/helper.h
@@ -176,6 +176,7 @@ DEF_HELPER_3(vmulosw, void, avr, avr, avr)
DEF_HELPER_3(vmuloub, void, avr, avr, avr)
DEF_HELPER_3(vmulouh, void, avr, avr, avr)
DEF_HELPER_3(vmulouw, void, avr, avr, avr)
+DEF_HELPER_3(vmuluwm, void, avr, avr, avr)
DEF_HELPER_3(vsrab, void, avr, avr, avr)
DEF_HELPER_3(vsrah, void, avr, avr, avr)
DEF_HELPER_3(vsraw, void, avr, avr, avr)
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 09590c7..7a50f4a 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -505,6 +505,7 @@ VARITH(ubm, u8)
VARITH(uhm, u16)
VARITH(uwm, u32)
VARITH(udm, u64)
+VARITH_DO(muluwm, *, u32)
#undef VARITH_DO
#undef VARITH
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index faee4c3..bbaaf6e 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -6962,6 +6962,9 @@ GEN_VXFORM(vmrglw, 6, 6);
GEN_VXFORM(vmuloub, 4, 0);
GEN_VXFORM(vmulouh, 4, 1);
GEN_VXFORM(vmulouw, 4, 2);
+GEN_VXFORM(vmuluwm, 4, 2);
+GEN_VXFORM_DUAL(vmulouw, PPC_ALTIVEC, PPC_NONE,
+ vmuluwm, PPC_NONE, PPC2_ALTIVEC_207)
GEN_VXFORM(vmulosb, 4, 4);
GEN_VXFORM(vmulosh, 4, 5);
GEN_VXFORM(vmulosw, 4, 6);
@@ -10348,7 +10351,7 @@ GEN_VXFORM(vmrglh, 6, 5),
GEN_VXFORM(vmrglw, 6, 6),
GEN_VXFORM(vmuloub, 4, 0),
GEN_VXFORM(vmulouh, 4, 1),
-GEN_VXFORM_207(vmulouw, 4, 2),
+GEN_VXFORM_DUAL(vmulouw, vmuluwm, 4, 2, PPC_ALTIVEC, PPC_NONE),
GEN_VXFORM(vmulosb, 4, 4),
GEN_VXFORM(vmulosh, 4, 5),
GEN_VXFORM_207(vmulosw, 4, 6),
--
1.7.1
- [Qemu-ppc] [PATCH 01/28] target-ppc: Altivec 2.07: Add Instruction Flag, (continued)
- [Qemu-ppc] [PATCH 01/28] target-ppc: Altivec 2.07: Add Instruction Flag, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 02/28] target-ppc: Altivec 2.07: Update AVR Structure, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 03/28] target-ppc: Altivec 2.07: Add GEN_VXFORM3, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 04/28] target-ppc: Altivec 2.07: Add Support for Dual Altivec Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 05/28] target-ppc: Altivec 2.07: Add Opcode Macro for VX Form Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 06/28] target-ppc: Altivec 2.07: Add Support for R-Form Dual Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 07/28] target-ppc: Altivec 2.07: Vector Logical Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 09/28] target-ppc: Altivec 2.07: Change VMUL_DO to Support 64-bit Integers, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 08/28] target-ppc: Altivec 2.07: Add/Subtract Unsigned Doubleword Modulo, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 10/28] target-ppc: Altivec 2.07: Multiply Even/Odd Word Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 11/28] target-ppc: Altivec 2.07: vmuluw Instruction,
Tom Musta <=
- [Qemu-ppc] [PATCH 13/28] target-ppc: Altivec 2.07: Vector Population Count Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 12/28] target-ppc: Altivec 2.07: Add Vector Count Leading Zeroes, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 14/28] target-ppc: Altivec 2.07: Vector Min/Max Doubleword Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 15/28] target-ppc: Altivec 2.07: Pack Doubleword Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 17/28] target-ppc: Altivec 2.07: Vector Merge Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 16/28] target-ppc: Altivec 2.07: Unpack Signed Word Instructions, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 20/28] target-ppc: Altivec 2.07: Quadword Addition and Subtracation, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 21/28] target-ppc: Altivec 2.07: vbpermq Instruction, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 22/28] target-ppc: Altivec 2.07: Doubleword Compares, Tom Musta, 2014/02/12
- [Qemu-ppc] [PATCH 23/28] target-ppc: Altivec 2.07: Vector Gather Bits by Bytes, Tom Musta, 2014/02/12