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
This commit is contained in:
aurel32 2009-02-05 13:42:57 +00:00
parent 374dfc33e2
commit f586ce09e2
3 changed files with 12 additions and 0 deletions

View File

@ -232,6 +232,7 @@ DEF_HELPER_3(vsum2sws, void, avr, avr, avr)
DEF_HELPER_3(vsum4sbs, void, avr, avr, avr) DEF_HELPER_3(vsum4sbs, void, avr, avr, avr)
DEF_HELPER_3(vsum4shs, void, avr, avr, avr) DEF_HELPER_3(vsum4shs, void, avr, avr, avr)
DEF_HELPER_3(vsum4ubs, 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(vrfim, void, avr, avr)
DEF_HELPER_2(vrfin, void, avr, avr) DEF_HELPER_2(vrfin, void, avr, avr)
DEF_HELPER_2(vrfip, void, avr, avr) DEF_HELPER_2(vrfip, void, avr, avr)

View File

@ -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]); 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) #if defined(WORDS_BIGENDIAN)
#define LEFT 0 #define LEFT 0
#define RIGHT 1 #define RIGHT 1

View File

@ -6468,6 +6468,7 @@ GEN_VXFORM_NOA(vupklsb, 7, 10);
GEN_VXFORM_NOA(vupklsh, 7, 11); GEN_VXFORM_NOA(vupklsh, 7, 11);
GEN_VXFORM_NOA(vupkhpx, 7, 13); GEN_VXFORM_NOA(vupkhpx, 7, 13);
GEN_VXFORM_NOA(vupklpx, 7, 15); GEN_VXFORM_NOA(vupklpx, 7, 15);
GEN_VXFORM_NOA(vrlogefp, 5, 7);
GEN_VXFORM_NOA(vrfim, 5, 8); GEN_VXFORM_NOA(vrfim, 5, 8);
GEN_VXFORM_NOA(vrfin, 5, 9); GEN_VXFORM_NOA(vrfin, 5, 9);
GEN_VXFORM_NOA(vrfip, 5, 10); GEN_VXFORM_NOA(vrfip, 5, 10);