comparison 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
comparison
equal deleted inserted replaced
1827:c945a25aa75c 1828:37afb9cf58be
2656 retn(code); 2656 retn(code);
2657 2657
2658 opts->start_context = (start_fun)code->cur; 2658 opts->start_context = (start_fun)code->cur;
2659 save_callee_save_regs(code); 2659 save_callee_save_regs(code);
2660 #ifdef X86_64 2660 #ifdef X86_64
2661 if (opts->gen.scratch2 != RDI) { 2661 if (opts->gen.scratch2 != FIRST_ARG_REG) {
2662 mov_rr(code, RDI, opts->gen.scratch2, SZ_PTR); 2662 mov_rr(code, FIRST_ARG_REG, opts->gen.scratch2, SZ_PTR);
2663 }
2664 if (opts->gen.context_reg != SECOND_ARG_REG) {
2665 mov_rr(code, SECOND_ARG_REG, opts->gen.context_reg, SZ_PTR);
2663 } 2666 }
2664 #else 2667 #else
2665 mov_rdispr(code, RSP, 20, opts->gen.scratch2, SZ_D); 2668 mov_rdispr(code, RSP, 20, opts->gen.scratch2, SZ_D);
2666 mov_rdispr(code, RSP, 24, opts->gen.context_reg, SZ_D); 2669 mov_rdispr(code, RSP, 24, opts->gen.context_reg, SZ_D);
2667 #endif 2670 #endif