diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-04-18 19:48:04 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-04-18 19:48:04 -0700 |
commit | 2a700065e99ba29857b9f429aa8997af24116760 (patch) | |
tree | fbe37eeb5514198f7f31a4ac6923a0a44964a696 /m68k_core_x86.c | |
parent | aa41d9724e763de7a64776a7a2c262a5757383f9 (diff) | |
parent | 05af6e2720d03b538e64a73a84af1f4c4f8ce762 (diff) |
Merge
Diffstat (limited to 'm68k_core_x86.c')
-rw-r--r-- | m68k_core_x86.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/m68k_core_x86.c b/m68k_core_x86.c index a0a6f06..6455e70 100644 --- a/m68k_core_x86.c +++ b/m68k_core_x86.c @@ -2658,8 +2658,11 @@ void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chu 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); |