[4472] moved eflags computation outside op.c
Revision: 4472
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4472 Author: bellard Date: 2008-05-17 13:57:33 +0000 (Sat, 17 May 2008)
Log Message:
-----------
moved eflags computation outside op.c
Modified Paths:
--------------
trunk/target-i386/helper.c
trunk/target-i386/helper_template.h
trunk/target-i386/op.c
trunk/target-i386/ops_template.hModified: trunk/target-i386/helper.c
===================================================================
target-i386/helper.c +79 -0
@@ -5239,3 +5239,82 @@#undef SHIFT#endif + +static int compute_all_eflags (void ) +{ +return CC_SRC ; +} + +static int compute_c_eflags (void ) +{ +return CC_SRC &CC_C ; +} + +CCTable cc_table[CC_OP_NB ] = { + [CC_OP_DYNAMIC ] = {/* should never happen */ }, + + [CC_OP_EFLAGS ] = { compute_all_eflags, compute_c_eflags }, + + [CC_OP_MULB ] = { compute_all_mulb, compute_c_mull }, + [CC_OP_MULW ] = { compute_all_mulw, compute_c_mull }, + [CC_OP_MULL ] = { compute_all_mull, compute_c_mull }, + + [CC_OP_ADDB ] = { compute_all_addb, compute_c_addb }, + [CC_OP_ADDW ] = { compute_all_addw, compute_c_addw }, + [CC_OP_ADDL ] = { compute_all_addl, compute_c_addl }, + + [CC_OP_ADCB ] = { compute_all_adcb, compute_c_adcb }, + [CC_OP_ADCW ] = { compute_all_adcw, compute_c_adcw }, + [CC_OP_ADCL ] = { compute_all_adcl, compute_c_adcl }, + + [CC_OP_SUBB ] = { compute_all_subb, compute_c_subb }, + [CC_OP_SUBW ] = { compute_all_subw, compute_c_subw }, + [CC_OP_SUBL ] = { compute_all_subl, compute_c_subl }, + + [CC_OP_SBBB ] = { compute_all_sbbb, compute_c_sbbb }, + [CC_OP_SBBW ] = { compute_all_sbbw, compute_c_sbbw }, + [CC_OP_SBBL ] = { compute_all_sbbl, compute_c_sbbl }, + + [CC_OP_LOGICB ] = { compute_all_logicb, compute_c_logicb }, + [CC_OP_LOGICW ] = { compute_all_logicw, compute_c_logicw }, + [CC_OP_LOGICL ] = { compute_all_logicl, compute_c_logicl }, + + [CC_OP_INCB ] = { compute_all_incb, compute_c_incl }, + [CC_OP_INCW ] = { compute_all_incw, compute_c_incl }, + [CC_OP_INCL ] = { compute_all_incl, compute_c_incl }, + + [CC_OP_DECB ] = { compute_all_decb, compute_c_incl }, + [CC_OP_DECW ] = { compute_all_decw, compute_c_incl }, + [CC_OP_DECL ] = { compute_all_decl, compute_c_incl }, + + [CC_OP_SHLB ] = { compute_all_shlb, compute_c_shlb }, + [CC_OP_SHLW ] = { compute_all_shlw, compute_c_shlw }, + [CC_OP_SHLL ] = { compute_all_shll, compute_c_shll }, + + [CC_OP_SARB ] = { compute_all_sarb, compute_c_sarl }, + [CC_OP_SARW ] = { compute_all_sarw, compute_c_sarl }, + [CC_OP_SARL ] = { compute_all_sarl, compute_c_sarl }, + +#ifdef TARGET_X86_64 + [CC_OP_MULQ] = { compute_all_mulq, compute_c_mull }, + + [CC_OP_ADDQ ] = { compute_all_addq, compute_c_addq }, + + [CC_OP_ADCQ ] = { compute_all_adcq, compute_c_adcq }, + + [CC_OP_SUBQ ] = { compute_all_subq, compute_c_subq }, + + [CC_OP_SBBQ ] = { compute_all_sbbq, compute_c_sbbq }, + + [CC_OP_LOGICQ ] = { compute_all_logicq, compute_c_logicq }, + + [CC_OP_INCQ ] = { compute_all_incq, compute_c_incl }, + + [CC_OP_DECQ ] = { compute_all_decq, compute_c_incl }, + + [CC_OP_SHLQ ] = { compute_all_shlq, compute_c_shlq }, + + [CC_OP_SARQ ] = { compute_all_sarq, compute_c_sarl }, +#endif +}; +
Modified: trunk/target-i386/helper_template.h
===================================================================
target-i386/helper_template.h +217 -0
223 lines not on this page · raw message
Modified: trunk/target-i386/op.c
===================================================================
target-i386/op.c +0 -78
84 lines not on this page · raw message
Modified: trunk/target-i386/ops_template.h
===================================================================
target-i386/ops_template.h +0 -215
221 lines not on this page · raw message