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 /target-ppc/op_helper.c | |
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
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r-- | target-ppc/op_helper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index e4c446d34c..0e78e237ac 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) \ { \ |