diff options
author | Yang Zhong <yang.zhong@intel.com> | 2017-07-03 18:12:19 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-05 09:12:44 +0200 |
commit | 1d8ad165b688759bbf00e40431ee9fde8817d190 (patch) | |
tree | 4f43b9fb62be94a50e57a94717d3ba9dd27a46af /target/i386/cpu.h | |
parent | db573d2cf7ae6b5a4fc324be6f55e078fc218464 (diff) | |
download | qemu-1d8ad165b688759bbf00e40431ee9fde8817d190.zip qemu-1d8ad165b688759bbf00e40431ee9fde8817d190.tar.gz qemu-1d8ad165b688759bbf00e40431ee9fde8817d190.tar.bz2 |
target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline
Split the cpu_set_mxcsr() and make cpu_set_fpuc() inline with specific
tcg 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.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 8d9ba36..3495a91 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1594,7 +1594,6 @@ void QEMU_NORETURN raise_interrupt(CPUX86State *nenv, int intno, int is_int, /* cc_helper.c */ extern const uint8_t parity_table[256]; uint32_t cpu_cc_compute_all(CPUX86State *env1, int op); -void update_fp_status(CPUX86State *env); static inline uint32_t cpu_compute_eflags(CPUX86State *env) { @@ -1643,8 +1642,24 @@ static inline int32_t x86_get_a20_mask(CPUX86State *env) } /* fpu_helper.c */ -void cpu_set_mxcsr(CPUX86State *env, uint32_t val); -void cpu_set_fpuc(CPUX86State *env, uint16_t val); +void update_fp_status(CPUX86State *env); +void update_mxcsr_status(CPUX86State *env); + +static inline void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr) +{ + env->mxcsr = mxcsr; + if (tcg_enabled()) { + update_mxcsr_status(env); + } +} + +static inline void cpu_set_fpuc(CPUX86State *env, uint16_t fpuc) +{ + env->fpuc = fpuc; + if (tcg_enabled()) { + update_fp_status(env); + } +} /* mem_helper.c */ void helper_lock_init(void); |