diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-12 19:10:44 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-12 19:10:44 +0000 |
commit | 19e6c4b8bc0d692cd31900657714102a418f75e7 (patch) | |
tree | 4f8a674c11b3a30edc6e64bfa93485fbb8837b8d /target-i386/exec.h | |
parent | 4da450e6167830c88225915eb7e75b582b634215 (diff) |
converted x87 FPU ops to TCG
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4444 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/exec.h')
-rw-r--r-- | target-i386/exec.h | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/target-i386/exec.h b/target-i386/exec.h index 2c482b2c7d..3dee6c375f 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -231,6 +231,12 @@ static inline void stfl(target_ulong ptr, float v) #define floatx_to_int64 floatx80_to_int64 #define floatx_to_int32_round_to_zero floatx80_to_int32_round_to_zero #define floatx_to_int64_round_to_zero floatx80_to_int64_round_to_zero +#define int32_to_floatx int32_to_floatx80 +#define int64_to_floatx int64_to_floatx80 +#define float32_to_floatx float32_to_floatx80 +#define float64_to_floatx float64_to_floatx80 +#define floatx_to_float32 floatx80_to_float32 +#define floatx_to_float64 floatx80_to_float64 #define floatx_abs floatx80_abs #define floatx_chs floatx80_chs #define floatx_round_to_int floatx80_round_to_int @@ -251,6 +257,12 @@ static inline void stfl(target_ulong ptr, float v) #define floatx_to_int64 float64_to_int64 #define floatx_to_int32_round_to_zero float64_to_int32_round_to_zero #define floatx_to_int64_round_to_zero float64_to_int64_round_to_zero +#define int32_to_floatx int32_to_float64 +#define int64_to_floatx int64_to_float64 +#define float32_to_floatx float32_to_float64 +#define float64_to_floatx(x, e) (x) +#define floatx_to_float32 float64_to_float32 +#define floatx_to_float64(x, e) (x) #define floatx_abs float64_abs #define floatx_chs float64_chs #define floatx_round_to_int float64_round_to_int @@ -378,22 +390,6 @@ static inline void helper_fstt(CPU86_LDouble f, target_ulong ptr) } #else -/* XXX: same endianness assumed */ - -#ifdef CONFIG_USER_ONLY - -static inline CPU86_LDouble helper_fldt(target_ulong ptr) -{ - return *(CPU86_LDouble *)(unsigned long)ptr; -} - -static inline void helper_fstt(CPU86_LDouble f, target_ulong ptr) -{ - *(CPU86_LDouble *)(unsigned long)ptr = f; -} - -#else - /* we use memory access macros */ static inline CPU86_LDouble helper_fldt(target_ulong ptr) @@ -414,8 +410,6 @@ static inline void helper_fstt(CPU86_LDouble f, target_ulong ptr) stw(ptr + 8, temp.l.upper); } -#endif /* !CONFIG_USER_ONLY */ - #endif /* USE_X86LDOUBLE */ #define FPUS_IE (1 << 0) @@ -432,33 +426,7 @@ static inline void helper_fstt(CPU86_LDouble f, target_ulong ptr) extern const CPU86_LDouble f15rk[7]; -void helper_fldt_ST0_A0(void); -void helper_fstt_ST0_A0(void); void fpu_raise_exception(void); -CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b); -void helper_fbld_ST0_A0(void); -void helper_fbst_ST0_A0(void); -void helper_f2xm1(void); -void helper_fyl2x(void); -void helper_fptan(void); -void helper_fpatan(void); -void helper_fxtract(void); -void helper_fprem1(void); -void helper_fprem(void); -void helper_fyl2xp1(void); -void helper_fsqrt(void); -void helper_fsincos(void); -void helper_frndint(void); -void helper_fscale(void); -void helper_fsin(void); -void helper_fcos(void); -void helper_fxam_ST0(void); -void helper_fstenv(target_ulong ptr, int data32); -void helper_fldenv(target_ulong ptr, int data32); -void helper_fsave(target_ulong ptr, int data32); -void helper_frstor(target_ulong ptr, int data32); -void helper_fxsave(target_ulong ptr, int data64); -void helper_fxrstor(target_ulong ptr, int data64); void restore_native_fp_state(CPUState *env); void save_native_fp_state(CPUState *env); float approx_rsqrt(float a); |