mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
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>
This commit is contained in:
parent
ab0a19d4f0
commit
db573d2cf7
3 changed files with 18 additions and 20 deletions
|
@ -1418,8 +1418,6 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector,
|
||||||
|
|
||||||
/* op_helper.c */
|
/* op_helper.c */
|
||||||
/* used for debug or cpu save/restore */
|
/* 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 */
|
/* cpu-exec.c */
|
||||||
/* the following helpers are only usable in user mode simulation as
|
/* the following helpers are only usable in user mode simulation as
|
||||||
|
|
|
@ -1539,24 +1539,6 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx, uint64_t mask)
|
||||||
raise_exception_ra(env, EXCP0D_GPF, GETPC());
|
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 */
|
/* MMX/SSE */
|
||||||
/* XXX: optimize by storing fptt and fptags in the static cpu state */
|
/* XXX: optimize by storing fptt and fptags in the static cpu state */
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,24 @@ typedef struct x86_FPReg_tmp {
|
||||||
uint16_t tmp_exp;
|
uint16_t tmp_exp;
|
||||||
} x86_FPReg_tmp;
|
} 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)
|
static void fpreg_pre_save(void *opaque)
|
||||||
{
|
{
|
||||||
x86_FPReg_tmp *tmp = opaque;
|
x86_FPReg_tmp *tmp = opaque;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue