diff m68k_core_x86.c @ 1840:3d0b20e9a187

Merge
author Michael Pavone <pavone@retrodev.com>
date Thu, 18 Apr 2019 19:48:04 -0700
parents 37afb9cf58be
children 35722beaf895
line wrap: on
line diff
--- a/m68k_core_x86.c	Thu Apr 18 19:47:50 2019 -0700
+++ b/m68k_core_x86.c	Thu Apr 18 19:48:04 2019 -0700
@@ -2658,8 +2658,11 @@
 	opts->start_context = (start_fun)code->cur;
 	save_callee_save_regs(code);
 #ifdef X86_64
-	if (opts->gen.scratch2 != RDI) {
-		mov_rr(code, RDI, opts->gen.scratch2, SZ_PTR);
+	if (opts->gen.scratch2 != FIRST_ARG_REG) {
+		mov_rr(code, FIRST_ARG_REG, opts->gen.scratch2, SZ_PTR);
+	}
+	if (opts->gen.context_reg != SECOND_ARG_REG) {
+		mov_rr(code, SECOND_ARG_REG, opts->gen.context_reg, SZ_PTR);
 	}
 #else
 	mov_rdispr(code, RSP, 20, opts->gen.scratch2, SZ_D);