Mercurial > repos > blastem
diff gen.h @ 894:a7774fc2de4b
Partially working change to do proper stack alignment rather than doing a lame alignment check when calling a C compile dfunction. 68K core seems okay, but Z80 is busted.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 25 Nov 2015 08:40:45 -0800 |
parents | d0943769353b |
children | 2ec5e6eaf81d |
line wrap: on
line diff
--- a/gen.h Sun Nov 22 14:43:51 2015 -0800 +++ b/gen.h Wed Nov 25 08:40:45 2015 -0800 @@ -15,6 +15,7 @@ typedef struct { code_ptr cur; code_ptr last; + uint32_t stack_off; } code_info; void check_alloc_code(code_info *code, uint32_t inst_size); @@ -26,7 +27,8 @@ //call a function and put the arguments in the appropriate place according to the host ABI void call_args(code_info *code, code_ptr fun, uint32_t num_args, ...); //like the above, but follows other aspects of the ABI like stack alignment -void call_args_abi(code_info *code, code_ptr fun, uint32_t num_args, ...); +//void call_args_abi(code_info *code, code_ptr fun, uint32_t num_args, ...); +#define call_args_abi call_args void save_callee_save_regs(code_info *code); void restore_callee_save_regs(code_info *code);