summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-23 20:44:55 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-23 20:44:55 +0000
commit79f91c27bad7cf39ff336f1b2ed418942f65bab6 (patch)
treec2de50eaaa4315b44d81825df2471e1245f68507 /target-i386
parentdc9543dc22cd7a409500caccb1ff3183f53d5966 (diff)
downloadqemu-79f91c27bad7cf39ff336f1b2ed418942f65bab6.tar.gz
more fpu functions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1233 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/exec.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/target-i386/exec.h b/target-i386/exec.h
index 1923b95ee4..404457eba1 100644
--- a/target-i386/exec.h
+++ b/target-i386/exec.h
@@ -142,6 +142,44 @@ extern int loglevel;
#include "cpu.h"
#include "exec-all.h"
+/* XXX: add a generic FPU library */
+
+static inline double float32_to_float64(float a)
+{
+ return a;
+}
+
+static inline float float64_to_float32(double a)
+{
+ return a;
+}
+
+#if defined(__powerpc__)
+/* better to call an helper on ppc */
+float int32_to_float32(int32_t a);
+double int32_to_float64(int32_t a);
+#else
+static inline float int32_to_float32(int32_t a)
+{
+ return (float)a;
+}
+
+static inline double int32_to_float64(int32_t a)
+{
+ return (double)a;
+}
+#endif
+
+static inline float int64_to_float32(int64_t a)
+{
+ return (float)a;
+}
+
+static inline double int64_to_float64(int64_t a)
+{
+ return (double)a;
+}
+
typedef struct CCTable {
int (*compute_all)(void); /* return all the flags */
int (*compute_c)(void); /* return the C flag */
@@ -559,6 +597,7 @@ void restore_native_fp_state(CPUState *env);
void save_native_fp_state(CPUState *env);
float approx_rsqrt(float a);
float approx_rcp(float a);
+double helper_sqrt(double a);
int fpu_isnan(double a);
extern const uint8_t parity_table[256];