mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
famec: eliminate global context ptr
saves like 25-35K of .text current compile resource usage on i5-6600K: cpu mem gcc 5.4.0: 17.0 1.1g clang 3.8: 1686 2.3g FAMEC_NO_GOTOS: gcc 5.4.0: 8.4 0.4g clang 3.8: 20.0 0.15g vs2008/O2: ~1800 ? vs2008/O1: ~720 ?
This commit is contained in:
parent
12f23dac6f
commit
7669591e08
7 changed files with 346 additions and 371 deletions
|
@ -117,15 +117,10 @@ PICO_INTERNAL void SekInitS68k(void)
|
|||
}
|
||||
#endif
|
||||
#ifdef EMU_F68K
|
||||
{
|
||||
void *oldcontext = g_m68kcontext;
|
||||
g_m68kcontext = &PicoCpuFS68k;
|
||||
memset(&PicoCpuFS68k, 0, sizeof(PicoCpuFS68k));
|
||||
fm68k_init();
|
||||
PicoCpuFS68k.iack_handler = SekIntAckFS68k;
|
||||
PicoCpuFS68k.sr = 0x2704; // Z flag
|
||||
g_m68kcontext = oldcontext;
|
||||
}
|
||||
memset(&PicoCpuFS68k, 0, sizeof(PicoCpuFS68k));
|
||||
fm68k_init();
|
||||
PicoCpuFS68k.iack_handler = SekIntAckFS68k;
|
||||
PicoCpuFS68k.sr = 0x2704; // Z flag
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -149,11 +144,7 @@ PICO_INTERNAL int SekResetS68k(void)
|
|||
}
|
||||
#endif
|
||||
#ifdef EMU_F68K
|
||||
{
|
||||
void *oldcontext = g_m68kcontext;
|
||||
fm68k_reset(&PicoCpuFS68k);
|
||||
g_m68kcontext = oldcontext;
|
||||
}
|
||||
fm68k_reset(&PicoCpuFS68k);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue