diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-09 16:49:29 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-09 16:49:29 +0000 |
commit | bdfbac3512ac3faad4f084867e066d7c1c8f63fa (patch) | |
tree | fb242dd8d1df6653fdc61b68999be940fb8b12f6 | |
parent | 875b31db7fb33b8155727d2b1a5232c0d7a0a655 (diff) |
target-ppc: Add vrefp instruction
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6573 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-ppc/helper.h | 1 | ||||
-rw-r--r-- | target-ppc/op_helper.c | 10 | ||||
-rw-r--r-- | target-ppc/translate.c | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/target-ppc/helper.h b/target-ppc/helper.h index 3ee04b248..00a573c11 100644 --- a/target-ppc/helper.h +++ b/target-ppc/helper.h @@ -244,6 +244,7 @@ DEF_HELPER_3(vaddfp, void, avr, avr, avr) DEF_HELPER_3(vsubfp, void, avr, avr, avr) DEF_HELPER_3(vmaxfp, void, avr, avr, avr) DEF_HELPER_3(vminfp, void, avr, avr, avr) +DEF_HELPER_2(vrefp, void, avr, avr) DEF_HELPER_4(vmaddfp, void, avr, avr, avr, avr) DEF_HELPER_4(vnmsubfp, void, avr, avr, avr, avr) DEF_HELPER_2(vlogefp, void, avr, avr) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index e4c446d34..0e78e237a 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -2664,6 +2664,16 @@ VPK(uwum, u32, u16, I, 0) #undef VPK #undef PKBIG +void helper_vrefp (ppc_avr_t *r, ppc_avr_t *b) +{ + int i; + for (i = 0; i < ARRAY_SIZE(r->f); i++) { + HANDLE_NAN1(r->f[i], b->f[i]) { + r->f[i] = float32_div(float32_one, b->f[i], &env->vec_status); + } + } +} + #define VRFI(suffix, rounding) \ void helper_vrfi##suffix (ppc_avr_t *r, ppc_avr_t *b) \ { \ diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 4d5b45ab3..46bd177d6 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -6476,6 +6476,7 @@ GEN_VXFORM_NOA(vupklsb, 7, 10); GEN_VXFORM_NOA(vupklsh, 7, 11); GEN_VXFORM_NOA(vupkhpx, 7, 13); GEN_VXFORM_NOA(vupklpx, 7, 15); +GEN_VXFORM_NOA(vrefp, 5, 4); GEN_VXFORM_NOA(vlogefp, 5, 7); GEN_VXFORM_NOA(vrfim, 5, 8); GEN_VXFORM_NOA(vrfin, 5, 9); |