Commit dbe9742d by Michael Meissner

*** empty log message ***

From-SVN: r1138
parent d58c9875
...@@ -3047,6 +3047,7 @@ mips_debugger_offset (addr, offset) ...@@ -3047,6 +3047,7 @@ mips_debugger_offset (addr, offset)
return offset; return offset;
} }
/* A C compound statement to output to stdio stream STREAM the /* A C compound statement to output to stdio stream STREAM the
assembler syntax for an instruction operand X. X is an RTL 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) ...@@ -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 /* Return the bytes needed to compute the frame pointer from the current
stack pointer. stack pointer.
......
...@@ -147,7 +147,9 @@ extern int mips_epilogue_delay_slots (); ...@@ -147,7 +147,9 @@ extern int mips_epilogue_delay_slots ();
extern char *mips_fill_delay_slot (); extern char *mips_fill_delay_slot ();
extern char *mips_move_1word (); extern char *mips_move_1word ();
extern char *mips_move_2words (); extern char *mips_move_2words ();
extern void mips_output_double ();
extern int mips_output_external (); extern int mips_output_external ();
extern void mips_output_float ();
extern void mips_output_filename (); extern void mips_output_filename ();
extern void mips_output_lineno (); extern void mips_output_lineno ();
extern char *output_block_move (); extern char *output_block_move ();
...@@ -426,7 +428,7 @@ while (0) ...@@ -426,7 +428,7 @@ while (0)
/* Print subsidiary information on the compiler version in use. */ /* 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 #ifndef MACHINE_TYPE
#define MACHINE_TYPE "BSD Mips" #define MACHINE_TYPE "BSD Mips"
...@@ -3006,21 +3008,14 @@ while (0) ...@@ -3006,21 +3008,14 @@ while (0)
/* This is how to output an assembler line defining a `double' constant. */ /* This is how to output an assembler line defining a `double' constant. */
#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \ #define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
{ \ mips_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]); \
}
/* This is how to output an assembler line defining a `float' constant. */ /* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \ #define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
{ \ mips_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); \
}
/* This is how to output an assembler line defining an `int' constant. */ /* This is how to output an assembler line defining an `int' constant. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment