aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1992-06-02 19:35:24 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1992-06-02 19:35:24 +0000
commitdbe9742d4f5f8e66ca9195317d5fa28ba34361eb (patch)
treefd47f6b222d945ac0d943ac8b274f247faafae60 /gcc
parentd58c987538c199be667fd51fa0d954351e970681 (diff)
downloadgcc-dbe9742d4f5f8e66ca9195317d5fa28ba34361eb.zip
gcc-dbe9742d4f5f8e66ca9195317d5fa28ba34361eb.tar.gz
gcc-dbe9742d4f5f8e66ca9195317d5fa28ba34361eb.tar.bz2
*** empty log message ***
From-SVN: r1138
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mips/mips.c40
-rw-r--r--gcc/config/mips/mips.h19
2 files changed, 47 insertions, 12 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 80eae53..612b495 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3047,6 +3047,7 @@ mips_debugger_offset (addr, offset)
return offset;
}
+
/* A C compound statement to output to stdio stream STREAM the
assembler syntax for an instruction operand X. X is an RTL
@@ -3664,6 +3665,45 @@ mips_declare_object (stream, name, init_string, final_string, size)
}
+/* Output a double precision value to the assembler. If both the
+ host and target are IEEE, emit the values in hex. */
+
+void
+mips_output_double (stream, value)
+ FILE *stream;
+ REAL_VALUE_TYPE value;
+{
+#ifdef REAL_VALUE_TO_TARGET_DOUBLE
+ long value_long[2];
+ REAL_VALUE_TO_TARGET_DOUBLE (value, value_long);
+
+ fprintf (stream, "\t.word\t0x%08lx\t\t# %.20g\n\t.word\t0x%08lx\n",
+ value_long[0], value, value_long[1]);
+#else
+ fprintf (stream, "\t.double\t%.20g\n", value);
+#endif
+}
+
+
+/* Output a single precision value to the assembler. If both the
+ host and target are IEEE, emit the values in hex. */
+
+void
+mips_output_float (stream, value)
+ FILE *stream;
+ REAL_VALUE_TYPE value;
+{
+#ifdef REAL_VALUE_TO_TARGET_SINGLE
+ long value_long;
+ REAL_VALUE_TO_TARGET_SINGLE (value, value_long);
+
+ fprintf (stream, "\t.word\t0x%08lx\t\t# %.12g (float)\n", value_long, value);
+#else
+ fprintf (stream, "\t.float\t%.12g\n", value);
+#endif
+}
+
+
/* Return the bytes needed to compute the frame pointer from the current
stack pointer.
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 041ab49..0e631e6 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -147,7 +147,9 @@ extern int mips_epilogue_delay_slots ();
extern char *mips_fill_delay_slot ();
extern char *mips_move_1word ();
extern char *mips_move_2words ();
+extern void mips_output_double ();
extern int mips_output_external ();
+extern void mips_output_float ();
extern void mips_output_filename ();
extern void mips_output_lineno ();
extern char *output_block_move ();
@@ -426,7 +428,7 @@ while (0)
/* Print subsidiary information on the compiler version in use. */
-#define MIPS_VERSION "[AL 1.1, MM 18]"
+#define MIPS_VERSION "[AL 1.1, MM 19]"
#ifndef MACHINE_TYPE
#define MACHINE_TYPE "BSD Mips"
@@ -3006,21 +3008,14 @@ while (0)
/* This is how to output an assembler line defining a `double' constant. */
#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
-{ \
- union { double d; long l[2]; } u2; \
- u2.d = VALUE; \
- fprintf (STREAM, "\t.word\t0x%08lx\t\t# %.20g\n\t.word\t0x%08lx\n", \
- u2.l[0], u2.d, u2.l[1]); \
-}
+ mips_output_double (STREAM, VALUE)
+
/* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
-{ \
- union { float f; long l; } u2; \
- u2.f = VALUE; \
- fprintf (STREAM, "\t.word\t0x%08lx\t\t# %.12g\n", u2.l, u2.f); \
-}
+ mips_output_float (STREAM, VALUE)
+
/* This is how to output an assembler line defining an `int' constant. */