summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-01-09 06:35:07 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-01-09 06:35:07 +0000
commit29f2a7862ad95616058a50c9e9910b709b41d619 (patch)
tree89860bdcfa8330f5907cd9d23fa96a972229b443
parent90e0297191749acf4abc52dd4203a187edde6d54 (diff)
Wow. I can't believe I got away for months without saving RBP.
Should fix linux crashes with 64-bit DRC.
-rw-r--r--src/emu/cpu/x64drc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/cpu/x64drc.c b/src/emu/cpu/x64drc.c
index 88cb07eb40c..f9f88451b67 100644
--- a/src/emu/cpu/x64drc.c
+++ b/src/emu/cpu/x64drc.c
@@ -521,9 +521,10 @@ void drc_append_restore_sse_rounding(drc_core *drc)
static void append_entry_point(drc_core *drc)
{
- int pushbytes = 8 * (5 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE));
+ int pushbytes = 8 * (6 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE));
/* save non-volatile registers */
+ emit_push_r64(DRCTOP, REG_DRC); // push drc
emit_push_r64(DRCTOP, REG_NV0); // push nv0
emit_push_r64(DRCTOP, REG_NV1); // push nv1
emit_push_r64(DRCTOP, REG_NV2); // push nv2
@@ -561,7 +562,7 @@ static void append_entry_point(drc_core *drc)
static void append_exit_point(drc_core *drc)
{
- int pushbytes = 8 * (5 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE));
+ int pushbytes = 8 * (6 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE));
/* on exit, P1 must contain the final PC */
emit_mov_m32_r32(DRCTOP, MDRC(drc->pcptr), REG_P1); // mov [pc],p1
@@ -580,6 +581,7 @@ static void append_exit_point(drc_core *drc)
emit_pop_r64(DRCTOP, REG_NV2); // pop nv2
emit_pop_r64(DRCTOP, REG_NV1); // pop nv1
emit_pop_r64(DRCTOP, REG_NV0); // pop nv0
+ emit_pop_r64(DRCTOP, REG_DRC); // pop drc
emit_ret(DRCTOP); // ret
}