aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
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);