sh2 drc, wrap generated function ptrs if called from host

This commit is contained in:
kub 2023-01-09 20:45:10 +00:00
parent e1b916547d
commit 0512a22869
8 changed files with 43 additions and 15 deletions

View file

@ -74,11 +74,11 @@ extern void REGPARM(1) (*sh2_drc_restore_sr)(SH2 *sh2);
#define DRC_SAVE_SR(sh2) \
if (likely((sh2->state & (SH2_IN_DRC|SH2_STATE_SLEEP)) == SH2_IN_DRC)) \
sh2->sr = (s32)_sh2_sr
// sh2_drc_save_sr(sh2)
// host_call(sh2_drc_save_sr, (SH2 *))(sh2)
#define DRC_RESTORE_SR(sh2) \
if (likely((sh2->state & (SH2_IN_DRC|SH2_STATE_SLEEP)) == SH2_IN_DRC)) \
_sh2_sr = (s32)sh2->sr
// sh2_drc_restore_sr(sh2)
// host_call(sh2_drc_restore_sr, (SH2 *))(sh2)
#else
#define DRC_DECLARE_SR
#define DRC_SAVE_SR(sh2)