From f11b6948bb1b5bf1be84c5a7c60d43c00a0e9dc3 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sat, 11 Oct 2014 19:34:48 -0700 Subject: [PATCH] Work around broken assembly for PLP instruction on Mac --- src/x86/cpu.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/x86/cpu.S b/src/x86/cpu.S index d6d3f21e..f195ddb1 100644 --- a/src/x86/cpu.S +++ b/src/x86/cpu.S @@ -1536,7 +1536,12 @@ E(op_PLA) // 0x68 E(op_PLP) // 0x28 Pop(%al) SNX_PROLOGUE(cpu65_flags_decode) +#ifdef APPLE_ASSEMBLER_IS_BROKEN + movb SNX(cpu65_flags_decode,_XAX,1), %al + movb %al, F_Reg +#else movb SNX(cpu65_flags_decode,_XAX,1), F_Reg +#endif orb $(B_Flag|X_Flag), F_Reg Continue @@ -2207,7 +2212,7 @@ E(cpu65_run) SNX_PROLOGUE(cpu65_flags_decode) #ifdef APPLE_ASSEMBLER_IS_BROKEN movb SNX(cpu65_flags_decode,_XAX,1), %al - movb %al, %ch + movb %al, F_Reg #else movb SNX(cpu65_flags_decode,_XAX,1), F_Reg #endif