summaryrefslogtreecommitdiff
path: root/gen_x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'gen_x86.c')
-rw-r--r--gen_x86.c13
1 files changed, 13 insertions, 0 deletions
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, ...)
{