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:
notaz 2017-10-15 01:15:00 +03:00
parent 12f23dac6f
commit 7669591e08
7 changed files with 346 additions and 371 deletions

View file

@ -128,15 +128,10 @@ PICO_INTERNAL void SekInit(void)
}
#endif
#ifdef EMU_F68K
{
void *oldcontext = g_m68kcontext;
g_m68kcontext = &PicoCpuFM68k;
memset(&PicoCpuFM68k, 0, sizeof(PicoCpuFM68k));
fm68k_init();
PicoCpuFM68k.iack_handler = SekIntAckF68K;
PicoCpuFM68k.sr = 0x2704; // Z flag
g_m68kcontext = oldcontext;
}
memset(&PicoCpuFM68k, 0, sizeof(PicoCpuFM68k));
fm68k_init();
PicoCpuFM68k.iack_handler = SekIntAckF68K;
PicoCpuFM68k.sr = 0x2704; // Z flag
#endif
}