https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108922
--- Comment #17 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #16)
> Doesn't the SDM guarantee the right behavior though?
Indeed, this is what is missing from Table 3-31.
> It is true that the FPREM results table says * and ** in certain spots
> (Table 3-31 in my copy), but then in the Invalid Arithmetic Operand
> Exception (#IA) chapter (8.5.1.2 for me) I see Table 8-10 Invalid Arithmetic
> Operations and the Masked Responses to Them
> and in there:
> Condition Masked Response
> Remainder instructions FPREM, Return the QNaN floating-point
> indefinite;
> FPREM1: modulus (divisor) is 0 clear condition code flag C2 to 0.
> or dividend is ∞.
> More questionable is the #Z case, where Table 8-11 just talks about
> Divide or reverse divide operation Returns an ∞ signed with the exclusive
> OR of the
> with a 0 divisor. sign of the two operands to the
> destination operand.
> but FPREM does division too, so I hope it is covered too (but not listed
> explicitly).
Table C-2 says that FPREM{,1} do not generate #Z exception.
So, based on the above finding, should insn condition be changed to
!flag_errno_math?