Mercurial > repos > blastem
comparison z80_to_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 | 8a29c250f352 |
children | 62166274e6c0 |
comparison
equal
deleted
inserted
replaced
1827:c945a25aa75c | 1828:37afb9cf58be |
---|---|
3599 | 3599 |
3600 options->run = (z80_ctx_fun)code->cur; | 3600 options->run = (z80_ctx_fun)code->cur; |
3601 tmp_stack_off = code->stack_off; | 3601 tmp_stack_off = code->stack_off; |
3602 save_callee_save_regs(code); | 3602 save_callee_save_regs(code); |
3603 #ifdef X86_64 | 3603 #ifdef X86_64 |
3604 mov_rr(code, RDI, options->gen.context_reg, SZ_PTR); | 3604 mov_rr(code, FIRST_ARG_REG, options->gen.context_reg, SZ_PTR); |
3605 #else | 3605 #else |
3606 mov_rdispr(code, RSP, 5 * sizeof(int32_t), options->gen.context_reg, SZ_PTR); | 3606 mov_rdispr(code, RSP, 5 * sizeof(int32_t), options->gen.context_reg, SZ_PTR); |
3607 #endif | 3607 #endif |
3608 call(code, options->load_context_scratch); | 3608 call(code, options->load_context_scratch); |
3609 cmp_irdisp(code, 0, options->gen.context_reg, offsetof(z80_context, extra_pc), SZ_PTR); | 3609 cmp_irdisp(code, 0, options->gen.context_reg, offsetof(z80_context, extra_pc), SZ_PTR); |