Refactoring for efficiency on restore from C

This commit is contained in:
Aaron Culliney 2014-06-07 12:41:47 -07:00
parent 32f53a4e57
commit fa03fb3d48

View File

@ -106,18 +106,13 @@
* it, else aux-stack using programs will crash when debugged.) * it, else aux-stack using programs will crash when debugged.)
*/ */
#define RestoreState \ #define RestoreState \
xorl _XAX, _XAX; \
xorl %ebx, %ebx; \
xorl %ecx, %ecx; \
movl $0x0100, SP_Reg_X; \ movl $0x0100, SP_Reg_X; \
xorl %esi, %esi; \ movzwl DebugCurrEA, EffectiveAddr_X; \
xorl %edi, %edi; \ movzwl SN(cpu65_current), PC_Reg_X; \
movw DebugCurrEA, EffectiveAddr; \ movzbl SN(cpu65_current)+2, AF_Reg_X; \
movw SN(cpu65_current), PC_Reg; \ movzbl SN(cpu65_current)+3, _XAX; \
movb SN(cpu65_current)+2, A_Reg; \
movb SN(cpu65_current)+3, %al; \
movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg; \ movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg; \
movb SN(cpu65_current)+4, X_Reg; \ movzbl SN(cpu65_current)+4, XY_Reg_X; \
movb SN(cpu65_current)+5, Y_Reg; \ movb SN(cpu65_current)+5, Y_Reg; \
movb SN(cpu65_current)+6, SP_Reg_L; \ movb SN(cpu65_current)+6, SP_Reg_L; \
movl SN(base_stackzp), _XAX; \ movl SN(base_stackzp), _XAX; \