aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.h
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2017-07-03 18:12:22 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-05 09:12:44 +0200
commit79c664f62d75cfba89a5bbe998622c8d5fdf833b (patch)
tree2e66cc569f0d24cdf796f40698122f91f34e1d8c /target/i386/cpu.h
parent6578eb25a07c0056976f466baf640ef59ae45ab5 (diff)
downloadqemu-79c664f62d75cfba89a5bbe998622c8d5fdf833b.zip
qemu-79c664f62d75cfba89a5bbe998622c8d5fdf833b.tar.gz
qemu-79c664f62d75cfba89a5bbe998622c8d5fdf833b.tar.bz2
target/i386: add the tcg_enabled() in target/i386/
Add the tcg_enabled() where the x86 target needs to disable TCG-specific code. Signed-off-by: Yang Zhong <yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r--target/i386/cpu.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 3495a91..7a228af 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -52,7 +52,9 @@
#include "exec/cpu-defs.h"
+#ifdef CONFIG_TCG
#include "fpu/softfloat.h"
+#endif
#define R_EAX 0
#define R_ECX 1
@@ -1597,7 +1599,11 @@ uint32_t cpu_cc_compute_all(CPUX86State *env1, int op);
static inline uint32_t cpu_compute_eflags(CPUX86State *env)
{
- return env->eflags | cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK);
+ uint32_t eflags = env->eflags;
+ if (tcg_enabled()) {
+ eflags |= cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK);
+ }
+ return eflags;
}
/* NOTE: the translator must set DisasContext.cc_op to CC_OP_EFLAGS