From 986b3641a1110e7dd1994c76ecb592420877f8f5 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 6 Oct 2016 09:34:31 -0700 Subject: Add support for specifying a reset handler in the M68K core. Adjust memory map initialization to handle extra field. Improved handling of out of bounds execution. --- gen_x86.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gen_x86.c') diff --git a/gen_x86.c b/gen_x86.c index 2f5689e..60ad90a 100644 --- a/gen_x86.c +++ b/gen_x86.c @@ -2138,6 +2138,19 @@ void call_args(code_info *code, code_ptr fun, uint32_t num_args, ...) code->stack_off -= adjust; } } + +void call_args_r(code_info *code, uint8_t fun_reg, uint32_t num_args, ...) +{ + va_list args; + va_start(args, num_args); + uint32_t adjust = prep_args(code, num_args, args); + va_end(args); + call_r(code, fun_reg); + if (adjust) { + add_ir(code, adjust, RSP, SZ_PTR); + code->stack_off -= adjust; + } +} /* void call_args_abi(code_info *code, code_ptr fun, uint32_t num_args, ...) { -- cgit v1.2.3