]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
MIPS: Add R5900 to ISA_HAS_FMIN_FMAX.
authorDavid Guillen Fandos <david@davidgf.net>
Wed, 14 Jan 2026 23:45:37 +0000 (00:45 +0100)
committerYunQiang Su <yunqiang@isrc.iscas.ac.cn>
Fri, 16 Jan 2026 00:31:19 +0000 (08:31 +0800)
The R5900 doesn't have proper IEEE754 handling: for all its FP
instructions, like "c.eq.s" or "add.s".

Since most of the other instructions are also broken,
so we can just define this, and the users should know about
what they are doing.

gcc/ChangeLog:

* config/mips/mips.h (ISA_HAS_FMIN_FMAX): Add R5900;
note that, R5900 is not IEEE754 fully compatiable.

Signed-off-by: David Guillen Fandos <david@davidgf.net>
gcc/config/mips/mips.h

index bafcb761871b0d6338ac11aca848e31ad9e6fa05..f52d0d2358cc232cdd5df4ee02b68452b497cbcc 100644 (file)
@@ -1278,7 +1278,8 @@ struct mips_cpu_info {
 #define ISA_HAS_9BIT_DISPLACEMENT      (mips_isa_rev >= 6              \
                                         || ISA_HAS_MIPS16E2)
 
-#define ISA_HAS_FMIN_FMAX      (mips_isa_rev >= 6)
+#define ISA_HAS_FMIN_FMAX      (mips_isa_rev >= 6                      \
+                                || TARGET_MIPS5900)
 
 #define ISA_HAS_FRINT          (mips_isa_rev >= 6)