# HG changeset patch # User Michael Pavone # Date 1420229098 28800 # Node ID bca748422bf0c37ad61c854516f90cf84c0f9ffd # Parent 7a5461001242fcfcecaebf7980a63c064900ca01 Use SZ_PTR instead of SZ_Q in Z80 core for 32-bit compat diff -r 7a5461001242 -r bca748422bf0 z80_to_x86.c --- a/z80_to_x86.c Fri Jan 02 00:19:10 2015 -0800 +++ b/z80_to_x86.c Fri Jan 02 12:04:58 2015 -0800 @@ -1671,7 +1671,7 @@ mov_irdisp(code, address, opts->gen.context_reg, offsetof(z80_context, pc), SZ_W); push_r(code, opts->gen.context_reg); call_args(code, (code_ptr)z80_interp_handler, 2, opts->gen.scratch1, opts->gen.scratch2); - mov_rr(code, RAX, opts->gen.scratch1, SZ_Q); + mov_rr(code, RAX, opts->gen.scratch1, SZ_PTR); pop_r(code, opts->gen.context_reg); call(code, opts->gen.load_context); jmp_r(code, opts->gen.scratch1); @@ -2276,7 +2276,7 @@ call(code, opts->gen.save_context); push_r(code, opts->gen.scratch1); call_args_abi(code, context->bp_handler, 2, opts->gen.context_reg, opts->gen.scratch1); - mov_rr(code, RAX, opts->gen.context_reg, SZ_Q); + mov_rr(code, RAX, opts->gen.context_reg, SZ_PTR); //Restore context call(code, opts->gen.load_context); pop_r(code, opts->gen.scratch1); @@ -2285,13 +2285,13 @@ uint8_t * jmp_off = code->cur+1; jcc(code, CC_NC, code->cur + 7); pop_r(code, opts->gen.scratch1); - add_ir(code, check_int_size - patch_size, opts->gen.scratch1, SZ_Q); + add_ir(code, check_int_size - patch_size, opts->gen.scratch1, SZ_PTR); push_r(code, opts->gen.scratch1); jmp(code, opts->gen.handle_cycle_limit_int); *jmp_off = code->cur - (jmp_off+1); //jump back to body of translated instruction pop_r(code, opts->gen.scratch1); - add_ir(code, check_int_size - patch_size, opts->gen.scratch1, SZ_Q); + add_ir(code, check_int_size - patch_size, opts->gen.scratch1, SZ_PTR); jmp_r(code, opts->gen.scratch1); }