diff gen_x86.c @ 1082:2ec5e6eaf81d

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.
author Michael Pavone <pavone@retrodev.com>
date Thu, 06 Oct 2016 09:34:31 -0700
parents cd6048e0397b
children 0649cd8ca097
line wrap: on
line diff
--- a/gen_x86.c	Thu Oct 06 09:25:43 2016 -0700
+++ b/gen_x86.c	Thu Oct 06 09:34:31 2016 -0700
@@ -2138,6 +2138,19 @@
 		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, ...)
 {