# HG changeset patch # User Michael Pavone # Date 1469686085 25200 # Node ID 05ecef6c73b63f5cf33bf88186d4f6e9d3cc9279 # Parent 6b07af1515b56baccfb10bbb63ac1be059149b2c More efficient register usage in 32-bit mode diff -r 6b07af1515b5 -r 05ecef6c73b6 z80_to_x86.c --- a/z80_to_x86.c Wed Jul 27 22:46:22 2016 -0700 +++ b/z80_to_x86.c Wed Jul 27 23:08:05 2016 -0700 @@ -2747,7 +2747,11 @@ 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;