From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
qemu-trivial@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Markus Armbruster" <armbru@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH v4 1/3] target/i386/cpu: Trivial code movement
Date: Thu, 1 Oct 2020 16:41:50 +0200 [thread overview]
Message-ID: <20201001144152.1555659-2-philmd@redhat.com> (raw)
In-Reply-To: <20201001144152.1555659-1-philmd@redhat.com>
Trivial code movement to reduce #ifdef'ry in the next commit.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/i386/cpu.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3ffd877dd5..2eec53ca22 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4643,16 +4643,6 @@ static void x86_cpu_get_feature_words(Object *obj, Visitor *v,
visit_type_X86CPUFeatureWordInfoList(v, "feature-words", &list, errp);
}
-/* Convert all '_' in a feature string option name to '-', to make feature
- * name conform to QOM property naming rule, which uses '-' instead of '_'.
- */
-static inline void feat2prop(char *s)
-{
- while ((s = strchr(s, '_'))) {
- *s = '-';
- }
-}
-
/* Return the feature property name for a feature flag bit */
static const char *x86_cpu_feature_name(FeatureWord w, int bitnr)
{
@@ -4677,6 +4667,17 @@ static const char *x86_cpu_feature_name(FeatureWord w, int bitnr)
return name;
}
+/*
+ * Convert all '_' in a feature string option name to '-', to make feature
+ * name conform to QOM property naming rule, which uses '-' instead of '_'.
+ */
+static inline void feat2prop(char *s)
+{
+ while ((s = strchr(s, '_'))) {
+ *s = '-';
+ }
+}
+
/* Compatibily hack to maintain legacy +-feat semantic,
* where +-feat overwrites any feature set by
* feat=on|feat even if the later is parsed after +-feat
--
2.26.2
next prev parent reply other threads:[~2020-10-01 14:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 14:41 [PATCH v4 0/3] target/i386: Restrict 'feature-words' property to x86 machines Philippe Mathieu-Daudé
2020-10-01 14:41 ` Philippe Mathieu-Daudé [this message]
2020-10-01 14:41 ` [PATCH v4 2/3] target/i386/cpu: Restrict some of feature-words uses to system-mode Philippe Mathieu-Daudé
2020-10-01 14:44 ` Philippe Mathieu-Daudé
2020-10-01 15:14 ` Paolo Bonzini
2020-10-01 15:27 ` Philippe Mathieu-Daudé
2020-10-01 15:37 ` Eduardo Habkost
2020-10-01 15:57 ` Philippe Mathieu-Daudé
2020-10-01 16:15 ` Eduardo Habkost
2020-10-01 14:41 ` [PATCH v4 3/3] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
2020-10-01 15:29 ` Eduardo Habkost
2020-10-01 15:37 ` Philippe Mathieu-Daudé
2020-10-01 15:53 ` Eduardo Habkost
2020-10-02 6:55 ` Markus Armbruster
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=20201001144152.1555659-2-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).