issue with each specifically for x86

ketmar ketmar at ketmar.no-ip.org
Wed Mar 7 20:21:42 UTC 2018


Steven Schveighoffer wrote:

it seems that the only difference between `void` and `double` lambda is one 
asm instruction: `fldl   (%edi)`. it is presend in `double` labmda, and 
absent in `void` lambda.

it looks like ignoring `double` result causes FPU stack imbalance ('cause 
compiler doesn't insert "FPU pop" instruction), and that affects the computations.

on 64 bit it doesn't matter, 'cause no FPU is used there.

the fix prolly should be easy: just emit "FPU pop" if function result is 
ignored. codegen should have this info at hand, i believe.


More information about the Digitalmars-d-learn mailing list