On Wed, 2011-11-30 at 17:05 -0800, Richard Henderson wrote:
> Oh, for the record, I think we should probably be saving and restoring the fp 
> state on all targets.  If we restart a transaction, we're really saying that 
> absolutely nothing happened.  Something like
> 
>   double a, b, c;
>   __transaction_atomic { a = b+c; }
> 
> shouldn't erroneously set the overflow flag if the first iteration of the 
> transaction generates an infinity but the final iteration doesn't.  The x86 
> port is currently wrong for this, as is the port I just posted for ARM, but I 
> make the attempt here.

The ABI defines the pr_hasNoFloatUpdate and pr_hasNoVectorUpdate flags
for _ITM_beginTransaction but we don't handle these currently.  I guess
we should do the save/restore unless those flags are set?

How difficult would it be to set these flags if there is no float/vector
update (I guess inter-procedural analysis could be sufficient as a first
step).


Torvald

Reply via email to