mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-04 18:04:40 +00:00
HACK around apparently problematic return from calling C
* HACK ALERT!!! movl(%eax), %eax --or-- movzbl(%eax), %eax
* This pattern appears to be generated in some cases by the compiler. It's not clear to me why it's a problem for
the emulator (not a crash per se, but an emulation lock-up).
* Current suspicion is that there are side-effects in the x86 flags from this instruction/indexing mode which are
copied into the 6502 flags
* Current sample code showing problem (and non-boot of emulator) is f785da40e9
This commit is contained in:
parent
403cb8b154
commit
53a9cc3950
@ -83,9 +83,13 @@ E(func) pushl XY_Regs_32; \
|
||||
pushl FF_Reg; \
|
||||
pushl SP_Reg; \
|
||||
pushl PC_Reg_E; \
|
||||
pushl %eax; /* HACK: works around mysterious issue with generated mov(%eax), %eax ... */ \
|
||||
pushl EffectiveAddr_E; \
|
||||
call SN(c_##func); \
|
||||
popl %edx; /* dummy */ \
|
||||
movb %al, %dl; \
|
||||
popl %eax; /* ... ugh */ \
|
||||
movb %dl, %al; \
|
||||
popl PC_Reg_E; \
|
||||
popl SP_Reg; \
|
||||
popl FF_Reg; \
|
||||
|
Loading…
Reference in New Issue
Block a user