Simplify BranchXCycles

This commit is contained in:
Aaron Culliney 2015-03-22 15:46:58 -07:00
parent 1635cd5245
commit 358541b8cc

View File

@ -209,14 +209,12 @@
#define pc_hi_next r0 #define pc_hi_next r0
#define BranchXCycles \ #define BranchXCycles \
_IncOpCycles \ _IncOpCycles \
mov pc_hi_prev, PC_Reg; \ mov pc_hi_prev, PC_Reg, LSR #8; \
mov pc_hi_prev, pc_hi_prev, LSR #8; \
cbw; \ cbw; \
add PC_Reg, PC_Reg, r0; /* branch PC */ \ add PC_Reg, PC_Reg, r0; /* branch PC */ \
mov PC_Reg, PC_Reg, LSL #16; /* 16bit under/overflow protection */ \ mov PC_Reg, PC_Reg, LSL #16; /* 16bit under/overflow protection */ \
mov PC_Reg, PC_Reg, LSR #16; \ mov PC_Reg, PC_Reg, LSR #16; \
mov pc_hi_next, PC_Reg; \ mov pc_hi_next, PC_Reg, LSR #8; \
mov pc_hi_next, pc_hi_next, LSR #8; \
teq pc_hi_next, pc_hi_prev; \ teq pc_hi_next, pc_hi_prev; \
addne scratch_count, scratch_count, #1; /* +1 branch taken */ \ addne scratch_count, scratch_count, #1; /* +1 branch taken */ \
strb scratch_count, [mem_cycle_count]; strb scratch_count, [mem_cycle_count];