summaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 13:42:57 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 13:42:57 +0000
commitf586ce09e22e9b9b264f1acd7e5f24dd5de7233b (patch)
tree4ace65cb84da165a40205d48f5053ac1b593be3a /target-ppc
parent374dfc33e260c9836e32ae7a0a90d951f3989aff (diff)
downloadqemu-f586ce09e22e9b9b264f1acd7e5f24dd5de7233b.tar.gz
qemu-f586ce09e22e9b9b264f1acd7e5f24dd5de7233b.tar.bz2
qemu-f586ce09e22e9b9b264f1acd7e5f24dd5de7233b.zip
target-ppc: add vrlogefp instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6519 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/helper.h1
-rw-r--r--target-ppc/op_helper.c10
-rw-r--r--target-ppc/translate.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/target-ppc/helper.h b/target-ppc/helper.h
index b8b0a22f20..0a38e30235 100644
--- a/target-ppc/helper.h
+++ b/target-ppc/helper.h
@@ -232,6 +232,7 @@ DEF_HELPER_3(vsum2sws, void, avr, avr, avr)
DEF_HELPER_3(vsum4sbs, void, avr, avr, avr)
DEF_HELPER_3(vsum4shs, void, avr, avr, avr)
DEF_HELPER_3(vsum4ubs, void, avr, avr, avr)
+DEF_HELPER_2(vrlogefp, void, avr, avr)
DEF_HELPER_2(vrfim, void, avr, avr)
DEF_HELPER_2(vrfin, void, avr, avr)
DEF_HELPER_2(vrfip, void, avr, avr)
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index b8e5538587..4eac3020b1 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -2539,6 +2539,16 @@ void helper_vsel (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
r->u64[1] = (a->u64[1] & ~c->u64[1]) | (b->u64[1] & c->u64[1]);
}
+void helper_vrlogefp (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_log2(b->f[i], &env->vec_status);
+ }
+ }
+}
+
#if defined(WORDS_BIGENDIAN)
#define LEFT 0
#define RIGHT 1
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 7f4c7d7a17..3cc8186db1 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -6468,6 +6468,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(vrlogefp, 5, 7);
GEN_VXFORM_NOA(vrfim, 5, 8);
GEN_VXFORM_NOA(vrfin, 5, 9);
GEN_VXFORM_NOA(vrfip, 5, 10);