Fix op_record_cr6_VD() to use less branches (gcc 4.1.2 build fix on x86-32)

This commit is contained in:
gbeauche 2006-07-19 22:21:46 +00:00
parent 87e1518e96
commit 2c27914196

View File

@ -1657,13 +1657,19 @@ void op_vxor_VD_V0_V1(void)
void op_record_cr6_VD(void)
{
if (VD.j[0] == UVAL64(0xffffffffffffffff) &&
VD.j[1] == UVAL64(0xffffffffffffffff))
powerpc_dyngen_helper::cr().set(6, 8);
else if (VD.j[0] == UVAL64(0) && VD.j[1] == UVAL64(0))
powerpc_dyngen_helper::cr().set(6, 2);
else
powerpc_dyngen_helper::cr().set(6, 0);
unsigned int cr6 = 0;
#if SIZEOF_VOID_P == 8
if ((~VD.j[0] | ~VD.j[1]) == 0)
cr6 = 8;
else if ((VD.j[0] | VD.j[1]) == 0)
cr6 = 2;
#else
if ((~VD.w[0] | ~VD.w[1] | ~VD.w[2] | ~VD.w[3]) == 0)
cr6 = 8;
else if ((VD.w[0] | VD.w[1] | VD.w[2] | VD.w[3]) == 0)
cr6 = 2;
#endif
powerpc_dyngen_helper::cr().set(6, cr6);
dyngen_barrier();
}