Add fsel instruction emulation (VEX's jm-ppc-test -f)

This commit is contained in:
gbeauche 2006-07-04 04:25:02 +00:00
parent 635ee55a5d
commit 0a2f9d3f03
3 changed files with 8 additions and 0 deletions

View File

@ -568,6 +568,12 @@ const powerpc_cpu::instr_info_t powerpc_cpu::powerpc_ii_table[] = {
PPC_I(FRSP),
X_form, 63, 12, CFLOW_NORMAL
},
{ "fsel",
EXECUTE_FP_ARITH(double, fsel, RD, RA, RC, RB, RC_BIT_G, false),
NULL,
PPC_I(FSEL),
A_form, 63, 23, CFLOW_NORMAL
},
{ "fsub",
EXECUTE_FP_ARITH(double, fsub, RD, RA, RB, NONE, RC_BIT_G, true),
NULL,

View File

@ -100,6 +100,7 @@ enum powerpc_instruction {
PPC_I(FNMSUB),
PPC_I(FNMSUBS),
PPC_I(FRSP),
PPC_I(FSEL),
PPC_I(FSUB),
PPC_I(FSUBS),
PPC_I(ICBI),

View File

@ -141,6 +141,7 @@ DEFINE_OP1(fneg, double, -x);
DEFINE_OP3(fnmadd, double, -((x * y) + z));
DEFINE_OP3(fnmsub, double, -((x * y) - z));
DEFINE_OP2(fsub, double, x - y);
DEFINE_OP3(fsel, double, (x >= 0.0) ? y : z);
DEFINE_OP1(fnops, float, x);
DEFINE_OP1(fabss, float, fabs(x));