fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns After the refactor from ab52f973a504f8de0c5df64631ba4caea70a7d9e the bahaviour of int32_to_float32() was altered. helper_ftoi() in target/tricore/fpu_helper.c relied on int32_to_float32 to raise the invalid flag if the input was NaN to properly return 0. Likewise if the input is infinity. The obvious fix for softfloat would be to raise this flag in round_to_int_and_pack(). However, I'm not sure if this breaks other targets and I have no easy way to test it. Yeah it looks like it was missed, the round_to_uint code does it. Do you have a test case I can verify? On 04/10/2018 10:07 PM, Alex Bennée wrote: > Yeah it looks like it was missed, the round_to_uint code does it. > > Do you have a test case I can verify? > For the NaN input 0xffffffff the expected result for the flags is that flag_invalid is raised. I can provide you with some TriCore asm, but it is a bit of pain to get the gnu assembler to build, since the public version is a decade old. Cheers, Bastian Bastian Koppelmann