mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sh2 drc, wrap generated function ptrs if called from host
This commit is contained in:
parent
e1b916547d
commit
0512a22869
8 changed files with 43 additions and 15 deletions
|
@ -1393,6 +1393,9 @@ static void emith_lohi_nops(void)
|
|||
if (_s) emith_add_r_r_ptr_imm(SP, SP, _s); \
|
||||
} while (0)
|
||||
|
||||
#define host_call(addr, args) \
|
||||
addr
|
||||
|
||||
#define host_arg2reg(rd, arg) \
|
||||
rd = (arg+4)
|
||||
|
||||
|
@ -1602,7 +1605,7 @@ static int emith_cond_check(int cond, int *r)
|
|||
|
||||
#define emith_call_reg(r) \
|
||||
emith_branch(MIPS_JALR(LR, r))
|
||||
#define emith_call_ctx(offs) do { \
|
||||
#define emith_abicall_ctx(offs) do { \
|
||||
emith_ctx_read_ptr(CR, offs); \
|
||||
emith_call_reg(CR); \
|
||||
} while (0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue