[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 38/42] target/i386: make cpu_get_fp80()/cpu_set_fp80(
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 38/42] target/i386: make cpu_get_fp80()/cpu_set_fp80() static |
Date: |
Wed, 5 Jul 2017 09:14:41 +0200 |
From: Yang Zhong <address@hidden>
Move cpu_get_fp80()/cpu_set_fp80() from fpu_helper.c to
machine.c because fpu_helper.c will be disabled if tcg is
disabled in the build.
Signed-off-by: Yang Zhong <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/cpu.h | 2 --
target/i386/fpu_helper.c | 18 ------------------
target/i386/machine.c | 18 ++++++++++++++++++
3 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index c5e143e..8d9ba36 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1418,8 +1418,6 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned
int selector,
/* op_helper.c */
/* used for debug or cpu save/restore */
-void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f);
-floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper);
/* cpu-exec.c */
/* the following helpers are only usable in user mode simulation as
diff --git a/target/i386/fpu_helper.c b/target/i386/fpu_helper.c
index 69ea33a..34fb5fc 100644
--- a/target/i386/fpu_helper.c
+++ b/target/i386/fpu_helper.c
@@ -1539,24 +1539,6 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx,
uint64_t mask)
raise_exception_ra(env, EXCP0D_GPF, GETPC());
}
-void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
-{
- CPU_LDoubleU temp;
-
- temp.d = f;
- *pmant = temp.l.lower;
- *pexp = temp.l.upper;
-}
-
-floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
-{
- CPU_LDoubleU temp;
-
- temp.l.upper = upper;
- temp.l.lower = mant;
- return temp.d;
-}
-
/* MMX/SSE */
/* XXX: optimize by storing fptt and fptags in the static cpu state */
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 8c7a822..53587ae 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -142,6 +142,24 @@ typedef struct x86_FPReg_tmp {
uint16_t tmp_exp;
} x86_FPReg_tmp;
+static void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
+{
+ CPU_LDoubleU temp;
+
+ temp.d = f;
+ *pmant = temp.l.lower;
+ *pexp = temp.l.upper;
+}
+
+static floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
+{
+ CPU_LDoubleU temp;
+
+ temp.l.upper = upper;
+ temp.l.lower = mant;
+ return temp.d;
+}
+
static void fpreg_pre_save(void *opaque)
{
x86_FPReg_tmp *tmp = opaque;
--
1.8.3.1
- [Qemu-devel] [PULL 28/42] cpu: move interrupt handling out of translate-common.c, (continued)
- [Qemu-devel] [PULL 28/42] cpu: move interrupt handling out of translate-common.c, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 29/42] tcg: make tcg_allowed global, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 32/42] tcg: add the tcg-stub.c file into accel/stubs/, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 31/42] vapic: use tcg_enabled, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 30/42] monitor: disable "info jit" and "info opcount" if !TCG, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 33/42] tcg: move tb_lock out of translate-all.h, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 37/42] target/i386: move cpu_sync_bndcs_hflags() function, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 34/42] exec: elide calls to tb_lock and tb_unlock, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 36/42] tcg: add the CONFIG_TCG into Makefiles, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 35/42] tcg: add CONFIG_TCG guards in headers, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 38/42] target/i386: make cpu_get_fp80()/cpu_set_fp80() static,
Paolo Bonzini <=
- [Qemu-devel] [PULL 41/42] target/i386: add the tcg_enabled() in target/i386/, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 39/42] target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 42/42] target/i386: add the CONFIG_TCG into Makefiles, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 40/42] target/i386: move TLB refill function out of helper.c, Paolo Bonzini, 2017/07/05
- Re: [Qemu-devel] [PULL 00/42] Misc changes for 2017-07-05, Peter Maydell, 2017/07/06
- Re: [Qemu-devel] [PULL 00/42] Misc changes for 2017-07-05, no-reply, 2017/07/06