mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 22:01:06 +00:00
target-m68k: Build the opcode table only once to avoid multithreading issues
Backports commit b208525797b031c1be4121553e21746686318a38 from qemu
This commit is contained in:
parent
fd84549b3e
commit
2fd7779aa5
|
@ -2906,6 +2906,13 @@ register_opcode(TCGContext *tcg_ctx, disas_proc proc, uint16_t opcode, uint16_t
|
|||
void register_m68k_insns (CPUM68KState *env)
|
||||
{
|
||||
TCGContext *tcg_ctx = env->uc->tcg_ctx;
|
||||
|
||||
/* Build the opcode table only once to avoid
|
||||
multithreading issues. */
|
||||
if (tcg_ctx->opcode_table[0] != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
#define INSN(name, opcode, mask, feature) do { \
|
||||
if (m68k_feature(env, M68K_FEATURE_##feature)) \
|
||||
register_opcode(tcg_ctx, disas_##name, 0x##opcode, 0x##mask); \
|
||||
|
|
Loading…
Reference in a new issue