From 376bef93cfadf5d0f778ac887500ee8d5d70fbcc Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 7 Apr 2019 00:06:29 -0700 Subject: Get 64-bit builds working for Windows target --- z80_to_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index c263e56..9c77674 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -3601,7 +3601,7 @@ void init_z80_opts(z80_options * options, memmap_chunk const * chunks, uint32_t tmp_stack_off = code->stack_off; save_callee_save_regs(code); #ifdef X86_64 - mov_rr(code, RDI, options->gen.context_reg, SZ_PTR); + mov_rr(code, FIRST_ARG_REG, options->gen.context_reg, SZ_PTR); #else mov_rdispr(code, RSP, 5 * sizeof(int32_t), options->gen.context_reg, SZ_PTR); #endif -- cgit v1.2.3