summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/config/m68k/news.h
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-03-03 21:37:38 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-03-03 21:37:38 +0000
commitc826e751760901de543f4640467e3a08df7f49bf (patch)
tree6a2323a78664ba45b78df1709ff3cc077db63ccd /gnu/usr.bin/gcc/config/m68k/news.h
parenta4511fe6a5dc69a771b5ffdf64ba574c959cf37d (diff)
GCC 2.8.0 merge
Diffstat (limited to 'gnu/usr.bin/gcc/config/m68k/news.h')
-rw-r--r--gnu/usr.bin/gcc/config/m68k/news.h68
1 files changed, 64 insertions, 4 deletions
diff --git a/gnu/usr.bin/gcc/config/m68k/news.h b/gnu/usr.bin/gcc/config/m68k/news.h
index 8300801b681..f83524cc0cf 100644
--- a/gnu/usr.bin/gcc/config/m68k/news.h
+++ b/gnu/usr.bin/gcc/config/m68k/news.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. SONY NEWS-OS 4 version.
- Copyright (C) 1987, 1989, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1987, 89, 93, 94, 96, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
/* See m68k.h. 7 means 68020 with 68881. */
-#define TARGET_DEFAULT 7
+#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
This will control the use of inline 68881 insns in certain macros. */
@@ -105,8 +105,6 @@ Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_DOUBLE
#undef ASM_OUTPUT_SKIP
#undef ASM_FORMAT_PRIVATE_NAME
-#undef PRINT_OPERAND
-#undef PRINT_OPERAND_ADDRESS
#endif
#undef ASM_OUTPUT_ALIGN
@@ -299,6 +297,66 @@ do { char dstr[30]; \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 13), \
sprintf ((OUTPUT), "%s$$$%d", (NAME), (LABELNO)))
+/* Output a float value (represented as a C double) as an immediate operand.
+ This macro is a 68k-specific macro. */
+
+#undef ASM_OUTPUT_FLOAT_OPERAND
+#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
+ do { \
+ if (CODE == 'f') \
+ { \
+ char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL (VALUE, "%.9e", dstr); \
+ if (REAL_VALUE_ISINF (VALUE) || REAL_VALUE_ISNAN (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0f-99e999"); \
+ else \
+ fprintf (FILE, "#0f99e999"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ fprintf (FILE, "#0f-0.0"); \
+ else \
+ fprintf (FILE, "#0f%s", dstr); \
+ } \
+ else \
+ { \
+ long l; \
+ REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
+ fprintf (FILE, "#0x%lx", l); \
+ } \
+ } while (0)
+
+/* Output a double value (represented as a C double) as an immediate operand.
+ This macro is a 68k-specific macro. */
+#undef ASM_OUTPUT_DOUBLE_OPERAND
+#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
+ do { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr ); \
+ if (REAL_VALUE_ISINF (VALUE) || REAL_VALUE_ISNAN (VALUE)) \
+ { \
+ if (REAL_VALUE_NEGATIVE (VALUE)) \
+ fprintf (FILE, "#0d-99e999"); \
+ else \
+ fprintf (FILE, "#0d99e999"); \
+ } \
+ else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
+ fprintf (FILE, "#0d-0.0"); \
+ else \
+ fprintf (FILE, "#0d%s", dstr); \
+ } while (0)
+
+/* Note, long double immediate operands are not actually
+ generated by m68k.md. */
+#undef ASM_OUTPUT_LONG_DOUBLE_OPERAND
+#define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE) \
+ do { char dstr[30]; \
+ REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
+ asm_fprintf (FILE, "%I0r%s", dstr); \
+ } while (0)
+
+#if 0
+#undef PRINT_OPERAND
#define PRINT_OPERAND(FILE, X, CODE) \
{ if (CODE == '.') fprintf (FILE, "."); \
else if (CODE == '#') fprintf (FILE, "#"); \
@@ -354,7 +412,9 @@ do { char dstr[30]; \
fprintf (FILE, "#0d%s", dstr); } \
else if (CODE == 'b') output_addr_const (FILE, X); \
else { putc ('#', FILE); output_addr_const (FILE, X); }}
+#endif
+#undef PRINT_OPERAND_ADDRESS
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
{ register rtx reg1, reg2, breg, ireg; \
register rtx addr = ADDR; \