On Tue, Apr 19, 2011 at 06:37:14PM +0100, Peter Maydell wrote: > On 18 April 2011 22:00, Aurelien Jarno <aurel...@aurel32.net> 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?
Because softloat-native.h include it, but not softfloat.h. > > 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; > Correct, will fix that. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurel...@aurel32.net http://www.aurel32.net