This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k] Fix PR target/13292: -msoft-float seems to corrupt builtindefines
Richard Henderson wrote:
On Wed, Jun 16, 2004 at 08:51:43PM +0200, Bernardo Innocenti wrote:
I just wonder who's using this stuff. Perhaps it's
just something mandated by C99 and not yet fully
implemented in glibc.
Glibc has nothing to do with it. FLT_EVAL_METHOD is something
c99 gives to the user. If you're doing normal soft-float, the
setting should be zero.
Always? Currently, it would be 2 except with -m68040:
#define TARGET_FLT_EVAL_METHOD (TARGET_68040_ONLY ? 0 : 2)
Should I change it like this in my original patch
(or perhaps in a followup patch)?
2004-06-12 Bernardo Innocenti <bernie@develer.com>
PR target/13292
* config/m68k/m68k.h (TARGET_SWITCHES): Don't remove MASK_68040_ONLY
on -msoft-float.
(TARGET_FLT_EVAL_METHOD): Don't advertise extended precision for
68040 and soft-float.
* config/m68k/m68k.md (truncdfsf2): Explicitly require TARGET_68881
in the TARGET_68040_ONLY case.
Index: gcc/config/m68k/m68k.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.h,v
retrieving revision 1.114
diff -u -p -r1.114 m68k.h
--- gcc/config/m68k/m68k.h 5 Jun 2004 06:49:00 -0000 1.114
+++ gcc/config/m68k/m68k.h 16 Jun 2004 21:27:55 -0000
@@ -257,7 +257,7 @@ extern int target_flags;
{ "noshort", - MASK_SHORT, \
N_("Consider type `int' to be 32 bits wide") }, \
{ "68881", MASK_68881, "" }, \
- { "soft-float", - (MASK_68040_ONLY|MASK_68881), \
+ { "soft-float", - MASK_68881, \
N_("Generate code with library calls for floating point") }, \
{ "68020-40", -(MASK_ALL_CF_BITS|MASK_68060|MASK_68040_ONLY), \
N_("Generate code for a 68040, without any new instructions") }, \
@@ -355,7 +355,7 @@ extern int target_flags;
/* target machine storage layout */
#define LONG_DOUBLE_TYPE_SIZE 96
-#define TARGET_FLT_EVAL_METHOD (TARGET_68040_ONLY ? 0 : 2)
+#define TARGET_FLT_EVAL_METHOD ((TARGET_68040_ONLY || ! TARGET_68881) ? 0 : 2)
#define BITS_BIG_ENDIAN 1
#define BYTES_BIG_ENDIAN 1
Index: gcc/config/m68k/m68k.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.md,v
retrieving revision 1.76
diff -u -p -r1.76 m68k.md
--- gcc/config/m68k/m68k.md 29 May 2004 15:10:41 -0000 1.76
+++ gcc/config/m68k/m68k.md 16 Jun 2004 21:28:02 -0000
@@ -1498,7 +1498,7 @@
[(set (match_operand:SF 0 "nonimmediate_operand" "=f")
(float_truncate:SF
(match_operand:DF 1 "general_operand" "fmG")))]
- "TARGET_68040_ONLY"
+ "TARGET_68881 && TARGET_68040_ONLY"
{
if (FP_REG_P (operands[1]))
return "f%$move%.x %1,%0";
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/