Re: [patch,avr] Fix PR57516 fixed-point rounding in the overflow case

2013-07-19 Thread Denis Chertykov
2013/7/18 Georg-Johann Lay : > Currently, the fixed-point rounding does not work correctly in the overflow > case. This is because of misreading section 2.1.7.2 of TR 18037. > > Rounding builtins expand to saturated addition and AND so that the instruction > sequence is > > add value1 > if not ove

[patch,avr] Fix PR57516 fixed-point rounding in the overflow case

2013-07-18 Thread Georg-Johann Lay
Currently, the fixed-point rounding does not work correctly in the overflow case. This is because of misreading section 2.1.7.2 of TR 18037. Rounding builtins expand to saturated addition and AND so that the instruction sequence is add value1 if not overflow goto 0 load max value 0: and value2