aboutsummaryrefslogtreecommitdiff
path: root/target/i386/machine.c
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2017-07-03 18:12:16 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-05 09:12:44 +0200
commitdb573d2cf7ae6b5a4fc324be6f55e078fc218464 (patch)
tree47f298fe1b749a301551da886f860abeaa3473ec /target/i386/machine.c
parentab0a19d4f08d924e052eb369420d264240872f8a (diff)
target/i386: make cpu_get_fp80()/cpu_set_fp80() static
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 <yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/machine.c')
-rw-r--r--target/i386/machine.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 8c7a822e9f..53587ae88b 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;