summaryrefslogtreecommitdiff
path: root/gen_x86.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-03-25 00:21:32 -0700
committerMichael Pavone <pavone@retrodev.com>2017-03-25 00:21:32 -0700
commit61204637be41f75cfa67997b30f4820871c956b5 (patch)
tree394f1596bad2855775368e2f7b8e83c589a1e474 /gen_x86.c
parentb13c022c4b885f9ac0e649553211e69187d8aed9 (diff)
Prevent blowing past our native translated instruction size of 255 bytes when translating movem with a large register list. Fixes bug in which Fantastic Dizzy was completely broken on 32-bit builds
Diffstat (limited to 'gen_x86.c')
-rw-r--r--gen_x86.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gen_x86.c b/gen_x86.c
index a0cbc19..2da8055 100644
--- a/gen_x86.c
+++ b/gen_x86.c
@@ -1999,9 +1999,10 @@ void call_noalign(code_info *code, code_ptr fun)
code->cur = out;
}
-
+volatile int foo;
void call(code_info *code, code_ptr fun)
{
+ foo = *fun;
code->stack_off += sizeof(void *);
int32_t adjust = 0;
if (code->stack_off & 0xF) {
@@ -2064,6 +2065,11 @@ void retn(code_info *code)
code->cur = out;
}
+void rts(code_info *code)
+{
+ retn(code);
+}
+
void cdq(code_info *code)
{
check_alloc_code(code, 1);