summaryrefslogtreecommitdiff
path: root/z80_to_x86.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-07-27 23:08:05 -0700
committerMichael Pavone <pavone@retrodev.com>2016-07-27 23:08:05 -0700
commit8e8fa1937a768d6558b903c78fe0ea7150b36865 (patch)
treecddd84809463ca3d63eeb0f9383568c31d152471 /z80_to_x86.c
parent4fc2cd522e1487ba69cdfc2c40c54f2c0ca51797 (diff)
More efficient register usage in 32-bit mode
Diffstat (limited to 'z80_to_x86.c')
-rw-r--r--z80_to_x86.c6
1 files changed, 5 insertions, 1 deletions
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;