|
| From: | Peter Maydell |
| Subject: | Re: [Qemu-devel] [PATCH 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat |
| Date: | Tue, 19 Apr 2011 18:37:14 +0100 |
On 18 April 2011 22:00, Aurelien Jarno <address@hidden> wrote:
> +#include <math.h>
Why does this patch need this? I couldn't see anywhere where
the patch added calls to math functions we weren't calling before,
or did I miss one?
> void helper_fptan(void)
> {
> - CPU86_LDouble fptemp;
> + double fptemp = CPU86_LDouble_to_double(ST0);
>
> - fptemp = ST0;
> if((fptemp > MAXTAN)||(fptemp < -MAXTAN)) {
> env->fpus |= 0x400;
> } else {
> - ST0 = tan(fptemp);
> + fptemp = tan(fptemp);
> + ST0 = double_to_CPU86_LDouble(fptemp);
> fpush();
> - ST0 = 1.0;
> + ST0 = double_to_CPU86_LDouble(1.0);
You could just say:
ST0 = floatx_one;
-- PMM
| [Prev in Thread] | Current Thread | [Next in Thread] |