Add vrfi{m,n,p,z} instructions
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@6512 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
34ba2857a0
commit
f6b1964548
@ -232,6 +232,10 @@ 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(vrfim, void, avr, avr)
|
||||
DEF_HELPER_2(vrfin, void, avr, avr)
|
||||
DEF_HELPER_2(vrfip, void, avr, avr)
|
||||
DEF_HELPER_2(vrfiz, void, avr, avr)
|
||||
|
||||
DEF_HELPER_1(efscfsi, i32, i32)
|
||||
DEF_HELPER_1(efscfui, i32, i32)
|
||||
|
@ -2490,6 +2490,24 @@ VPK(uwum, u32, u16, I, 0)
|
||||
#undef VPK
|
||||
#undef PKBIG
|
||||
|
||||
#define VRFI(suffix, rounding) \
|
||||
void helper_vrfi##suffix (ppc_avr_t *r, ppc_avr_t *b) \
|
||||
{ \
|
||||
int i; \
|
||||
float_status s = env->vec_status; \
|
||||
set_float_rounding_mode(rounding, &s); \
|
||||
for (i = 0; i < ARRAY_SIZE(r->f); i++) { \
|
||||
HANDLE_NAN1(r->f[i], b->f[i]) { \
|
||||
r->f[i] = float32_round_to_int (b->f[i], &s); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
VRFI(n, float_round_nearest_even)
|
||||
VRFI(m, float_round_down)
|
||||
VRFI(p, float_round_up)
|
||||
VRFI(z, float_round_to_zero)
|
||||
#undef VRFI
|
||||
|
||||
#define VROTATE(suffix, element) \
|
||||
void helper_vrl##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \
|
||||
{ \
|
||||
|
@ -6468,6 +6468,10 @@ 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(vrfim, 5, 8);
|
||||
GEN_VXFORM_NOA(vrfin, 5, 9);
|
||||
GEN_VXFORM_NOA(vrfip, 5, 10);
|
||||
GEN_VXFORM_NOA(vrfiz, 5, 11);
|
||||
|
||||
#define GEN_VXFORM_SIMM(name, opc2, opc3) \
|
||||
GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC) \
|
||||
|
Loading…
Reference in New Issue
Block a user