From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: [Qemu-devel] [PATCH] m68k: Build the opcode table only once to avoid multithreading issues
Date: Wed, 3 Feb 2016 11:14:13 +0100 [thread overview]
Message-ID: <1454494453-20738-2-git-send-email-glaubitz@physik.fu-berlin.de> (raw)
In-Reply-To: <1454494453-20738-1-git-send-email-glaubitz@physik.fu-berlin.de>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
target-m68k/translate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 535d7f9..a989961 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
+ multithreading issues. */
+ 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); \
--
2.7.0
next prev parent reply other threads:[~2016-02-03 10:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 10:14 [Qemu-devel] Updated patch for the opcode table John Paul Adrian Glaubitz
2016-02-03 10:14 ` John Paul Adrian Glaubitz [this message]
2016-02-03 15:16 ` [Qemu-devel] [PATCH] m68k: Build the opcode table only once to avoid multithreading issues Eric Blake
2016-02-03 15:19 ` Laurent Vivier
2016-02-03 15:20 ` John Paul Adrian Glaubitz
2016-02-03 16:11 ` Eric Blake
2016-02-04 15:18 ` John Paul Adrian Glaubitz
2016-02-08 23:15 ` John Paul Adrian Glaubitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454494453-20738-2-git-send-email-glaubitz@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).