mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-04 12:58:15 +00:00
tcg: Split out tcg_raise_tb_overflow
Allow other places in tcg to restart with a smaller tb. Backports db6b7d0c6936cd209e3e8d95aea61ad29ceef5e6
This commit is contained in:
parent
6ef897bbad
commit
d83b1ea283
|
@ -275,6 +275,12 @@ static bool tcg_resolve_relocs(TCGContext *s)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Signal overflow, starting over with fewer guest insns. */
|
||||||
|
static void QEMU_NORETURN tcg_raise_tb_overflow(TCGContext *s)
|
||||||
|
{
|
||||||
|
siglongjmp(s->jmp_trans, -2);
|
||||||
|
}
|
||||||
|
|
||||||
#define C_PFX1(P, A) P##A
|
#define C_PFX1(P, A) P##A
|
||||||
#define C_PFX2(P, A, B) P##A##_##B
|
#define C_PFX2(P, A, B) P##A##_##B
|
||||||
#define C_PFX3(P, A, B, C) P##A##_##B##_##C
|
#define C_PFX3(P, A, B, C) P##A##_##B##_##C
|
||||||
|
@ -648,8 +654,7 @@ static TCGTemp *tcg_temp_alloc(TCGContext *s)
|
||||||
int n = s->nb_temps++;
|
int n = s->nb_temps++;
|
||||||
|
|
||||||
if (n >= TCG_MAX_TEMPS) {
|
if (n >= TCG_MAX_TEMPS) {
|
||||||
/* Signal overflow, starting over with fewer guest insns. */
|
tcg_raise_tb_overflow(s);
|
||||||
siglongjmp(s->jmp_trans, -2);
|
|
||||||
}
|
}
|
||||||
return memset(&s->temps[n], 0, sizeof(TCGTemp));
|
return memset(&s->temps[n], 0, sizeof(TCGTemp));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue