From 8e8fa1937a768d6558b903c78fe0ea7150b36865 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 27 Jul 2016 23:08:05 -0700 Subject: More efficient register usage in 32-bit mode --- z80_to_x86.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index 7501662..83ff6e3 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -2747,7 +2747,11 @@ void init_z80_opts(z80_options * options, memmap_chunk const * chunks, uint32_t memset(options->regs, -1, sizeof(options->regs)); options->regs[Z80_A] = RAX; options->regs[Z80_R] = AH; - options->regs[Z80_SP] = RBX; + options->regs[Z80_H] = BH; + options->regs[Z80_L] = RBX; + options->regs[Z80_HL] = RBX; + + options->regs[Z80_SP] = RDI; options->gen.scratch1 = RCX; options->gen.scratch2 = RDX; -- cgit v1.2.3