Mercurial > repos > blastem
diff m68k_core_x86.c @ 1828:37afb9cf58be
Get 64-bit builds working for Windows target
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 07 Apr 2019 00:06:29 -0700 |
parents | 15116d4fdf40 |
children | 35722beaf895 |
line wrap: on
line diff
--- a/m68k_core_x86.c Sat Apr 06 21:38:11 2019 -0700 +++ b/m68k_core_x86.c Sun Apr 07 00:06:29 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);