Mercurial > repos > blastem
diff m68k_core_x86.c @ 1842:49f65d240299 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 14 Apr 2019 23:38:02 -0700 |
parents | 37afb9cf58be |
children | 35722beaf895 |
line wrap: on
line diff
--- a/m68k_core_x86.c Thu Mar 14 23:40:50 2019 -0700 +++ b/m68k_core_x86.c Sun Apr 14 23:38:02 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);