Revision 79f91c27
b/target-i386/exec.h | ||
---|---|---|
142 | 142 |
#include "cpu.h" |
143 | 143 |
#include "exec-all.h" |
144 | 144 |
|
145 |
/* XXX: add a generic FPU library */ |
|
146 |
|
|
147 |
static inline double float32_to_float64(float a) |
|
148 |
{ |
|
149 |
return a; |
|
150 |
} |
|
151 |
|
|
152 |
static inline float float64_to_float32(double a) |
|
153 |
{ |
|
154 |
return a; |
|
155 |
} |
|
156 |
|
|
157 |
#if defined(__powerpc__) |
|
158 |
/* better to call an helper on ppc */ |
|
159 |
float int32_to_float32(int32_t a); |
|
160 |
double int32_to_float64(int32_t a); |
|
161 |
#else |
|
162 |
static inline float int32_to_float32(int32_t a) |
|
163 |
{ |
|
164 |
return (float)a; |
|
165 |
} |
|
166 |
|
|
167 |
static inline double int32_to_float64(int32_t a) |
|
168 |
{ |
|
169 |
return (double)a; |
|
170 |
} |
|
171 |
#endif |
|
172 |
|
|
173 |
static inline float int64_to_float32(int64_t a) |
|
174 |
{ |
|
175 |
return (float)a; |
|
176 |
} |
|
177 |
|
|
178 |
static inline double int64_to_float64(int64_t a) |
|
179 |
{ |
|
180 |
return (double)a; |
|
181 |
} |
|
182 |
|
|
145 | 183 |
typedef struct CCTable { |
146 | 184 |
int (*compute_all)(void); /* return all the flags */ |
147 | 185 |
int (*compute_c)(void); /* return the C flag */ |
... | ... | |
559 | 597 |
void save_native_fp_state(CPUState *env); |
560 | 598 |
float approx_rsqrt(float a); |
561 | 599 |
float approx_rcp(float a); |
600 |
double helper_sqrt(double a); |
|
562 | 601 |
int fpu_isnan(double a); |
563 | 602 |
|
564 | 603 |
extern const uint8_t parity_table[256]; |
Also available in: Unified diff