This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add gnu_attribute for -mfp64 MIPS FP ABI variant
- From: Thiemo Seufer <ths at networkno dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 Nov 2007 01:00:54 +0000
- Subject: [PATCH] Add gnu_attribute for -mfp64 MIPS FP ABI variant
Hello All,
this patch adds a gnu_attribute value for one more MIPS floating-point
ABI variant. MIPS32 R2 allows to use 64-bit wide floating-point
registers in an otherwise 32-bit system, the respective code model
is selected in GCC via -mhard-float -mfp64. Recent binutils CVS
knows already about the new gnu_attribute value.
Thiemo
2007-11-19 Thiemo Seufer <ths@mips.com>
* config/mips/mips.c (mips_file_start): Add support for
flagging 32-bit code with -mfp64 floating-point.
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c.orig 2007-11-18 01:15:03.000000000 +0000
+++ gcc/config/mips/mips.c 2007-11-18 01:33:09.000000000 +0000
@@ -7086,7 +7086,9 @@
#ifdef HAVE_AS_GNU_ATTRIBUTE
fprintf (asm_out_file, "\t.gnu_attribute 4, %d\n",
- TARGET_HARD_FLOAT_ABI ? (TARGET_DOUBLE_FLOAT ? 1 : 2) : 3);
+ (TARGET_HARD_FLOAT_ABI
+ ? (TARGET_DOUBLE_FLOAT
+ ? ((!TARGET_64BIT && TARGET_FLOAT64) ? 4 : 1) : 2) : 3));
#endif
}