qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Claudio Fontana <cfontana@suse.de>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [PULL 13/17] i386: tcg: remove inline from cpu_load_eflags
Date: Thu, 17 Dec 2020 13:46:16 -0500	[thread overview]
Message-ID: <20201217184620.3945917-14-ehabkost@redhat.com> (raw)
In-Reply-To: <20201217184620.3945917-1-ehabkost@redhat.com>

From: Claudio Fontana <cfontana@suse.de>

make it a regular function.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201212155530.23098-9-cfontana@suse.de>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target/i386/tcg/helper-tcg.h  | 15 ++-------------
 target/i386/tcg/misc_helper.c | 13 +++++++++++++
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h
index 148edf49a3..c133c63555 100644
--- a/target/i386/tcg/helper-tcg.h
+++ b/target/i386/tcg/helper-tcg.h
@@ -78,19 +78,8 @@ void QEMU_NORETURN raise_interrupt(CPUX86State *nenv, int intno, int is_int,
 /* cc_helper.c */
 extern const uint8_t parity_table[256];
 
-/*
- * NOTE: the translator must set DisasContext.cc_op to CC_OP_EFLAGS
- * after generating a call to a helper that uses this.
- */
-static inline void cpu_load_eflags(CPUX86State *env, int eflags,
-                                   int update_mask)
-{
-    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
-    CC_OP = CC_OP_EFLAGS;
-    env->df = 1 - (2 * ((eflags >> 10) & 1));
-    env->eflags = (env->eflags & ~update_mask) |
-        (eflags & update_mask) | 0x2;
-}
+/* misc_helper.c */
+void cpu_load_eflags(CPUX86State *env, int eflags, int update_mask);
 
 /* svm_helper.c */
 void QEMU_NORETURN cpu_vmexit(CPUX86State *nenv, uint32_t exit_code,
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index c99370e5e3..0bd6c95749 100644
--- a/target/i386/tcg/misc_helper.c
+++ b/target/i386/tcg/misc_helper.c
@@ -26,6 +26,19 @@
 #include "exec/address-spaces.h"
 #include "helper-tcg.h"
 
+/*
+ * NOTE: the translator must set DisasContext.cc_op to CC_OP_EFLAGS
+ * after generating a call to a helper that uses this.
+ */
+void cpu_load_eflags(CPUX86State *env, int eflags, int update_mask)
+{
+    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+    CC_OP = CC_OP_EFLAGS;
+    env->df = 1 - (2 * ((eflags >> 10) & 1));
+    env->eflags = (env->eflags & ~update_mask) |
+        (eflags & update_mask) | 0x2;
+}
+
 void helper_outb(CPUX86State *env, uint32_t port, uint32_t data)
 {
 #ifdef CONFIG_USER_ONLY
-- 
2.28.0



  parent reply	other threads:[~2020-12-17 18:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 18:46 [PULL 00/17] x86 queue, 2020-12-17 Eduardo Habkost
2020-12-17 18:46 ` [PULL 01/17] i386: move kvm accel files into kvm/ Eduardo Habkost
2020-12-17 18:46 ` [PULL 02/17] i386: move whpx accel files into whpx/ Eduardo Habkost
2020-12-17 18:46 ` [PULL 03/17] i386: move hax accel files into hax/ Eduardo Habkost
2020-12-17 18:46 ` [PULL 04/17] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs Eduardo Habkost
2020-12-17 18:46 ` [PULL 05/17] i386: move TCG accel files into tcg/ Eduardo Habkost
2020-12-17 18:46 ` [PULL 06/17] i386: move cpu dump out of helper.c into cpu-dump.c Eduardo Habkost
2020-12-17 18:46 ` [PULL 07/17] i386: move hyperv_vendor_id initialization to x86_cpu_realizefn() Eduardo Habkost
2020-12-17 22:33   ` Claudio Fontana
2020-12-17 22:53     ` Eduardo Habkost
2020-12-17 23:34       ` Claudio Fontana
2020-12-17 23:47         ` Eduardo Habkost
2020-12-18  0:07           ` Claudio Fontana
2020-12-18  1:05             ` Eduardo Habkost
2020-12-18  8:50               ` Claudio Fontana
2020-12-17 18:46 ` [PULL 08/17] i386: move hyperv_interface_id " Eduardo Habkost
2020-12-17 18:46 ` [PULL 09/17] i386: move hyperv_version_id " Eduardo Habkost
2020-12-17 18:46 ` [PULL 10/17] i386: move hyperv_limits " Eduardo Habkost
2020-12-17 18:46 ` [PULL 11/17] x86/cpu: Add AVX512_FP16 cpu feature Eduardo Habkost
2020-12-17 18:46 ` [PULL 12/17] i386: move TCG cpu class initialization to tcg/ Eduardo Habkost
2020-12-17 18:46 ` Eduardo Habkost [this message]
2020-12-17 18:46 ` [PULL 14/17] tcg: cpu_exec_{enter,exit} helpers Eduardo Habkost
2020-12-17 18:46 ` [PULL 15/17] tcg: make CPUClass.cpu_exec_* optional Eduardo Habkost
2020-12-17 18:46 ` [PULL 16/17] tcg: Make CPUClass.debug_excp_handler optional Eduardo Habkost
2020-12-17 18:46 ` [PULL 17/17] cpu: Remove unnecessary noop methods Eduardo Habkost
2020-12-17 20:48 ` [PULL 00/17] x86 queue, 2020-12-17 Peter Maydell

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=20201217184620.3945917-14-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=cfontana@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).