diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-01-30 18:36:11 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-01-30 18:36:11 +0100 |
commit | 6f3b0498dbfb4f264f406901a774078fbe0eca6e (patch) | |
tree | 59f2c52b38ecff6c1d5cddbec3870851fac167ab /ARMInterpreter_ALU.h | |
parent | 296212ac49f1edabccde826138f8f720ef9beef5 (diff) |
start refactoring shit: more accurate timing and way of counting cycles.
Diffstat (limited to 'ARMInterpreter_ALU.h')
-rw-r--r-- | ARMInterpreter_ALU.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/ARMInterpreter_ALU.h b/ARMInterpreter_ALU.h index 224de04..15b9948 100644 --- a/ARMInterpreter_ALU.h +++ b/ARMInterpreter_ALU.h @@ -24,36 +24,36 @@ namespace ARMInterpreter #define A_PROTO_ALU_OP(x) \ \ -s32 A_##x##_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSL_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSR_IMM(ARM* cpu); \ -s32 A_##x##_REG_ASR_IMM(ARM* cpu); \ -s32 A_##x##_REG_ROR_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSL_REG(ARM* cpu); \ -s32 A_##x##_REG_LSR_REG(ARM* cpu); \ -s32 A_##x##_REG_ASR_REG(ARM* cpu); \ -s32 A_##x##_REG_ROR_REG(ARM* cpu); \ -s32 A_##x##_IMM_S(ARM* cpu); \ -s32 A_##x##_REG_LSL_IMM_S(ARM* cpu); \ -s32 A_##x##_REG_LSR_IMM_S(ARM* cpu); \ -s32 A_##x##_REG_ASR_IMM_S(ARM* cpu); \ -s32 A_##x##_REG_ROR_IMM_S(ARM* cpu); \ -s32 A_##x##_REG_LSL_REG_S(ARM* cpu); \ -s32 A_##x##_REG_LSR_REG_S(ARM* cpu); \ -s32 A_##x##_REG_ASR_REG_S(ARM* cpu); \ -s32 A_##x##_REG_ROR_REG_S(ARM* cpu); +void A_##x##_IMM(ARM* cpu); \ +void A_##x##_REG_LSL_IMM(ARM* cpu); \ +void A_##x##_REG_LSR_IMM(ARM* cpu); \ +void A_##x##_REG_ASR_IMM(ARM* cpu); \ +void A_##x##_REG_ROR_IMM(ARM* cpu); \ +void A_##x##_REG_LSL_REG(ARM* cpu); \ +void A_##x##_REG_LSR_REG(ARM* cpu); \ +void A_##x##_REG_ASR_REG(ARM* cpu); \ +void A_##x##_REG_ROR_REG(ARM* cpu); \ +void A_##x##_IMM_S(ARM* cpu); \ +void A_##x##_REG_LSL_IMM_S(ARM* cpu); \ +void A_##x##_REG_LSR_IMM_S(ARM* cpu); \ +void A_##x##_REG_ASR_IMM_S(ARM* cpu); \ +void A_##x##_REG_ROR_IMM_S(ARM* cpu); \ +void A_##x##_REG_LSL_REG_S(ARM* cpu); \ +void A_##x##_REG_LSR_REG_S(ARM* cpu); \ +void A_##x##_REG_ASR_REG_S(ARM* cpu); \ +void A_##x##_REG_ROR_REG_S(ARM* cpu); #define A_PROTO_ALU_TEST(x) \ \ -s32 A_##x##_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSL_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSR_IMM(ARM* cpu); \ -s32 A_##x##_REG_ASR_IMM(ARM* cpu); \ -s32 A_##x##_REG_ROR_IMM(ARM* cpu); \ -s32 A_##x##_REG_LSL_REG(ARM* cpu); \ -s32 A_##x##_REG_LSR_REG(ARM* cpu); \ -s32 A_##x##_REG_ASR_REG(ARM* cpu); \ -s32 A_##x##_REG_ROR_REG(ARM* cpu); +void A_##x##_IMM(ARM* cpu); \ +void A_##x##_REG_LSL_IMM(ARM* cpu); \ +void A_##x##_REG_LSR_IMM(ARM* cpu); \ +void A_##x##_REG_ASR_IMM(ARM* cpu); \ +void A_##x##_REG_ROR_IMM(ARM* cpu); \ +void A_##x##_REG_LSL_REG(ARM* cpu); \ +void A_##x##_REG_LSR_REG(ARM* cpu); \ +void A_##x##_REG_ASR_REG(ARM* cpu); \ +void A_##x##_REG_ROR_REG(ARM* cpu); A_PROTO_ALU_OP(AND) A_PROTO_ALU_OP(EOR) @@ -72,54 +72,54 @@ A_PROTO_ALU_OP(MOV) A_PROTO_ALU_OP(BIC) A_PROTO_ALU_OP(MVN) -s32 A_MUL(ARM* cpu); -s32 A_MLA(ARM* cpu); -s32 A_UMULL(ARM* cpu); -s32 A_UMLAL(ARM* cpu); -s32 A_SMULL(ARM* cpu); -s32 A_SMLAL(ARM* cpu); - -s32 A_CLZ(ARM* cpu); - - -s32 T_LSL_IMM(ARM* cpu); -s32 T_LSR_IMM(ARM* cpu); -s32 T_ASR_IMM(ARM* cpu); - -s32 T_ADD_REG_(ARM* cpu); -s32 T_SUB_REG_(ARM* cpu); -s32 T_ADD_IMM_(ARM* cpu); -s32 T_SUB_IMM_(ARM* cpu); - -s32 T_MOV_IMM(ARM* cpu); -s32 T_CMP_IMM(ARM* cpu); -s32 T_ADD_IMM(ARM* cpu); -s32 T_SUB_IMM(ARM* cpu); - -s32 T_AND_REG(ARM* cpu); -s32 T_EOR_REG(ARM* cpu); -s32 T_LSL_REG(ARM* cpu); -s32 T_LSR_REG(ARM* cpu); -s32 T_ASR_REG(ARM* cpu); -s32 T_ADC_REG(ARM* cpu); -s32 T_SBC_REG(ARM* cpu); -s32 T_ROR_REG(ARM* cpu); -s32 T_TST_REG(ARM* cpu); -s32 T_NEG_REG(ARM* cpu); -s32 T_CMP_REG(ARM* cpu); -s32 T_CMN_REG(ARM* cpu); -s32 T_ORR_REG(ARM* cpu); -s32 T_MUL_REG(ARM* cpu); -s32 T_BIC_REG(ARM* cpu); -s32 T_MVN_REG(ARM* cpu); - -s32 T_ADD_HIREG(ARM* cpu); -s32 T_CMP_HIREG(ARM* cpu); -s32 T_MOV_HIREG(ARM* cpu); - -s32 T_ADD_PCREL(ARM* cpu); -s32 T_ADD_SPREL(ARM* cpu); -s32 T_ADD_SP(ARM* cpu); +void A_MUL(ARM* cpu); +void A_MLA(ARM* cpu); +void A_UMULL(ARM* cpu); +void A_UMLAL(ARM* cpu); +void A_SMULL(ARM* cpu); +void A_SMLAL(ARM* cpu); + +void A_CLZ(ARM* cpu); + + +void T_LSL_IMM(ARM* cpu); +void T_LSR_IMM(ARM* cpu); +void T_ASR_IMM(ARM* cpu); + +void T_ADD_REG_(ARM* cpu); +void T_SUB_REG_(ARM* cpu); +void T_ADD_IMM_(ARM* cpu); +void T_SUB_IMM_(ARM* cpu); + +void T_MOV_IMM(ARM* cpu); +void T_CMP_IMM(ARM* cpu); +void T_ADD_IMM(ARM* cpu); +void T_SUB_IMM(ARM* cpu); + +void T_AND_REG(ARM* cpu); +void T_EOR_REG(ARM* cpu); +void T_LSL_REG(ARM* cpu); +void T_LSR_REG(ARM* cpu); +void T_ASR_REG(ARM* cpu); +void T_ADC_REG(ARM* cpu); +void T_SBC_REG(ARM* cpu); +void T_ROR_REG(ARM* cpu); +void T_TST_REG(ARM* cpu); +void T_NEG_REG(ARM* cpu); +void T_CMP_REG(ARM* cpu); +void T_CMN_REG(ARM* cpu); +void T_ORR_REG(ARM* cpu); +void T_MUL_REG(ARM* cpu); +void T_BIC_REG(ARM* cpu); +void T_MVN_REG(ARM* cpu); + +void T_ADD_HIREG(ARM* cpu); +void T_CMP_HIREG(ARM* cpu); +void T_MOV_HIREG(ARM* cpu); + +void T_ADD_PCREL(ARM* cpu); +void T_ADD_SPREL(ARM* cpu); +void T_ADD_SP(ARM* cpu); } |