From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
rth@twiddle.net
Subject: [Qemu-devel] [PATCH 2/2] target-i386: Implement tcg_arch_init()
Date: Fri, 19 Dec 2014 02:26:05 -0200 [thread overview]
Message-ID: <1418963165-498-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1418963165-498-1-git-send-email-ehabkost@redhat.com>
With tcg_arch_init(), we can finally remove the "inited" variable from
x86_cpu_initfn().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/cpu.c | 7 -------
target-i386/translate.c | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index b81ac5c..dee112d 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2885,7 +2885,6 @@ static void x86_cpu_initfn(Object *obj)
X86CPU *cpu = X86_CPU(obj);
X86CPUClass *xcc = X86_CPU_GET_CLASS(obj);
CPUX86State *env = &cpu->env;
- static int inited;
cs->env_ptr = env;
cpu_exec_init(env);
@@ -2928,12 +2927,6 @@ static void x86_cpu_initfn(Object *obj)
env->cpuid_apic_id = x86_cpu_apic_id_from_index(cs->cpu_index);
x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort);
-
- /* init various static tables used in TCG mode */
- if (tcg_enabled() && !inited) {
- inited = 1;
- optimize_flags_init();
- }
}
static int64_t x86_cpu_get_arch_id(CPUState *cs)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index fc75da7..10b9cc2 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7841,7 +7841,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
return s->pc;
}
-void optimize_flags_init(void)
+void tcg_arch_init(void)
{
static const char reg_names[CPU_NB_REGS][4] = {
#ifdef TARGET_X86_64
--
1.9.3
next prev parent reply other threads:[~2014-12-19 4:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 4:26 [Qemu-devel] [PATCH 0/2] tcg: Move TCG arch-specific initialization inside TCG code Eduardo Habkost
2014-12-19 4:26 ` [Qemu-devel] [PATCH 1/2] tcg: Introduce tcg_arch_init() function Eduardo Habkost
2014-12-19 14:05 ` Richard Henderson
2014-12-19 4:26 ` Eduardo Habkost [this message]
2014-12-19 9:47 ` [Qemu-devel] [PATCH 0/2] tcg: Move TCG arch-specific initialization inside TCG code Andreas Färber
2014-12-19 10:29 ` Paolo Bonzini
2014-12-19 13:16 ` Eduardo Habkost
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=1418963165-498-3-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=afaerber@suse.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).