Le 03/02/2016 10:39, Laurent Vivier a écrit : > > > Le 03/02/2016 10:37, John Paul Adrian Glaubitz a écrit : >> Signed-off-by: John Paul Adrian Glaubitz <[email protected]> >> --- >> target-m68k/translate.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/target-m68k/translate.c b/target-m68k/translate.c >> index 535d7f9..f508d1e 100644 >> --- a/target-m68k/translate.c >> +++ b/target-m68k/translate.c >> @@ -2828,6 +2828,10 @@ register_opcode (disas_proc proc, uint16_t opcode, >> uint16_t mask) >> Later insn override earlier ones. */ >> void register_m68k_insns (CPUM68KState *env) >> { >> + /* Build the opcode table only once to avoid >> + issues with multithreading. */ >> + if(opcode_table[0] != NULL) >> + return; >> #define INSN(name, opcode, mask, feature) do { \ >> if (m68k_feature(env, M68K_FEATURE_##feature)) \ >> register_opcode(disas_##name, 0x##opcode, 0x##mask); \ >> > Reviewed-by: Laurent Vivier <[email protected]>
In fact, the line should be: + if (opcode_table[0] != NULL) + return; thanks to scripts/checkpatch.pl. Laurent
