diff options
author | Tom Musta <tommusta@gmail.com> | 2014-02-12 15:22:59 -0600 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-03-05 03:06:53 +0100 |
commit | 56eabc750862b985a6ddfc3905b534576eeee33e (patch) | |
tree | 1058f89c4f510df21b3b97354b38cd62510361f2 /target-ppc | |
parent | 111c5f54a1fda35ff3a35d5cb62cd5f0f3e9d5b2 (diff) | |
download | qemu-56eabc750862b985a6ddfc3905b534576eeee33e.zip qemu-56eabc750862b985a6ddfc3905b534576eeee33e.tar.gz qemu-56eabc750862b985a6ddfc3905b534576eeee33e.tar.bz2 |
target-ppc: Altivec 2.07: Add/Subtract Unsigned Doubleword Modulo
This patch adds two Altivec unsigned doublword modulo instructions that
are introduced in Power ISA Version V2.07:
- vaddudm : Vector Add Unsigned Doubleword Modulo
- vsubudm : Vector Subtrace Unsigned Doubleword Modulo
Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/helper.h | 2 | ||||
-rw-r--r-- | target-ppc/int_helper.c | 1 | ||||
-rw-r--r-- | target-ppc/translate.c | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/target-ppc/helper.h b/target-ppc/helper.h index a4480e8..1106e29 100644 --- a/target-ppc/helper.h +++ b/target-ppc/helper.h @@ -109,9 +109,11 @@ DEF_HELPER_FLAGS_1(ftsqrt, TCG_CALL_NO_RWG_SE, i32, i64) DEF_HELPER_3(vaddubm, void, avr, avr, avr) DEF_HELPER_3(vadduhm, void, avr, avr, avr) DEF_HELPER_3(vadduwm, void, avr, avr, avr) +DEF_HELPER_3(vaddudm, void, avr, avr, avr) DEF_HELPER_3(vsububm, void, avr, avr, avr) DEF_HELPER_3(vsubuhm, void, avr, avr, avr) DEF_HELPER_3(vsubuwm, void, avr, avr, avr) +DEF_HELPER_3(vsubudm, void, avr, avr, avr) DEF_HELPER_3(vavgub, void, avr, avr, avr) DEF_HELPER_3(vavguh, void, avr, avr, avr) DEF_HELPER_3(vavguw, void, avr, avr, avr) diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c index 71db3fb..3e36c0a 100644 --- a/target-ppc/int_helper.c +++ b/target-ppc/int_helper.c @@ -504,6 +504,7 @@ void helper_vaddcuw(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) VARITH(ubm, u8) VARITH(uhm, u16) VARITH(uwm, u32) +VARITH(udm, u64) #undef VARITH_DO #undef VARITH diff --git a/target-ppc/translate.c b/target-ppc/translate.c index ed1cf1d..b1986f4 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -6932,9 +6932,11 @@ static void glue(gen_, name0##_##name1)(DisasContext *ctx) \ GEN_VXFORM(vaddubm, 0, 0); GEN_VXFORM(vadduhm, 0, 1); GEN_VXFORM(vadduwm, 0, 2); +GEN_VXFORM(vaddudm, 0, 3); GEN_VXFORM(vsububm, 0, 16); GEN_VXFORM(vsubuhm, 0, 17); GEN_VXFORM(vsubuwm, 0, 18); +GEN_VXFORM(vsubudm, 0, 19); GEN_VXFORM(vmaxub, 1, 0); GEN_VXFORM(vmaxuh, 1, 1); GEN_VXFORM(vmaxuw, 1, 2); @@ -10338,9 +10340,11 @@ GEN_HANDLER_E(name0##_##name1, 0x4, opc2, (opc3 | 0x10), 0x00000000, tp0, tp1), GEN_VXFORM(vaddubm, 0, 0), GEN_VXFORM(vadduhm, 0, 1), GEN_VXFORM(vadduwm, 0, 2), +GEN_VXFORM_207(vaddudm, 0, 3), GEN_VXFORM(vsububm, 0, 16), GEN_VXFORM(vsubuhm, 0, 17), GEN_VXFORM(vsubuwm, 0, 18), +GEN_VXFORM_207(vsubudm, 0, 19), GEN_VXFORM(vmaxub, 1, 0), GEN_VXFORM(vmaxuh, 1, 1), GEN_VXFORM(vmaxuw, 1, 2), |