Commit f586ce09e22e9b9b264f1acd7e5f24dd5de7233b
1 parent
374dfc33
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
Showing
3 changed files
with
12 additions
and
0 deletions
target-ppc/helper.h
... | ... | @@ -232,6 +232,7 @@ DEF_HELPER_3(vsum2sws, void, avr, avr, avr) |
232 | 232 | DEF_HELPER_3(vsum4sbs, void, avr, avr, avr) |
233 | 233 | DEF_HELPER_3(vsum4shs, void, avr, avr, avr) |
234 | 234 | DEF_HELPER_3(vsum4ubs, void, avr, avr, avr) |
235 | +DEF_HELPER_2(vrlogefp, void, avr, avr) | |
235 | 236 | DEF_HELPER_2(vrfim, void, avr, avr) |
236 | 237 | DEF_HELPER_2(vrfin, void, avr, avr) |
237 | 238 | DEF_HELPER_2(vrfip, void, avr, avr) | ... | ... |
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) |
2539 | 2539 | r->u64[1] = (a->u64[1] & ~c->u64[1]) | (b->u64[1] & c->u64[1]); |
2540 | 2540 | } |
2541 | 2541 | |
2542 | +void helper_vrlogefp (ppc_avr_t *r, ppc_avr_t *b) | |
2543 | +{ | |
2544 | + int i; | |
2545 | + for (i = 0; i < ARRAY_SIZE(r->f); i++) { | |
2546 | + HANDLE_NAN1(r->f[i], b->f[i]) { | |
2547 | + r->f[i] = float32_log2(b->f[i], &env->vec_status); | |
2548 | + } | |
2549 | + } | |
2550 | +} | |
2551 | + | |
2542 | 2552 | #if defined(WORDS_BIGENDIAN) |
2543 | 2553 | #define LEFT 0 |
2544 | 2554 | #define RIGHT 1 | ... | ... |
target-ppc/translate.c
... | ... | @@ -6468,6 +6468,7 @@ GEN_VXFORM_NOA(vupklsb, 7, 10); |
6468 | 6468 | GEN_VXFORM_NOA(vupklsh, 7, 11); |
6469 | 6469 | GEN_VXFORM_NOA(vupkhpx, 7, 13); |
6470 | 6470 | GEN_VXFORM_NOA(vupklpx, 7, 15); |
6471 | +GEN_VXFORM_NOA(vrlogefp, 5, 7); | |
6471 | 6472 | GEN_VXFORM_NOA(vrfim, 5, 8); |
6472 | 6473 | GEN_VXFORM_NOA(vrfin, 5, 9); |
6473 | 6474 | GEN_VXFORM_NOA(vrfip, 5, 10); | ... | ... |