summaryrefslogtreecommitdiff
path: root/gen_x86.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-08-09 21:29:49 -0700
committerMichael Pavone <pavone@retrodev.com>2016-08-09 21:29:49 -0700
commit7b7f1e7af1996809f06bee9e2482eba8842b0061 (patch)
treea2e39534b37822c3e10c380aee660017be41c10a /gen_x86.c
parent46c44fac096a393eb933d78e564d55d0cbc33e28 (diff)
Fixed a bug in call_raxfallback that would cause the call to be omitted completely in the RAX fallback case. This fixes a crash on OpenBSD and possibly other systems
Diffstat (limited to 'gen_x86.c')
-rw-r--r--gen_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gen_x86.c b/gen_x86.c
index fec5790..2f5689e 100644
--- a/gen_x86.c
+++ b/gen_x86.c
@@ -2019,11 +2019,11 @@ void call_raxfallback(code_info *code, code_ptr fun)
*(out++) = disp;
disp >>= 8;
*(out++) = disp;
+ code->cur = out;
} else {
mov_ir(code, (int64_t)fun, RAX, SZ_PTR);
call_r(code, RAX);
}
- code->cur = out;
}
void call_r(code_info *code, uint8_t dst)