>> Unfortunately the assessment that there are only "small changes" or
>> "unimportant differences" is plain wrong. [...]

The 64-bit approximation was done to make the initial VEX implementation
of x87 floating point easier.  Simulating x87 FP even without having to
do 80-bit arithmetic was a major PITA, and the 64-bit approximation
scheme seemed a reasonable tradeoff for portable software.

It would be possible, at some effort, to do proper 80-bit arithmetic.
What it would take is a few new IR primops (Iop_AddF80 etc), hacking
the front ends to produce those, and having the instruction selectors
generate the right code.  Oh, and producing a bunch of test cases
to verify it all.

Although the inner standards-compliant engineer in me is more sympathetic
to the current implementation's bias in favour of portable (non-80-bit)
code, I can see that having x87 FP be 80 bit precise would sometimes be
helpful.

Even then it's not simple.  The x87 control word has a bit-pair that
controls the default x87 FP precision.  Currently V ignores all attempts to
change it, and just does its thing at 64 bits.  If 80-bit arithmetic
becomes supported, and V ignores attempts to change the precision away
from 80 bits, will we have people complaining that the default precision
can't be changed away from 80 bit?

J


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to