+2001-12-20 Richard Henderson <rth@redhat.com>
+
+ * varasm.c (assemble_real): Use REAL_VALUE_TO_x and assemble_integer
+ to emit floating point values.
+ (assemble_real_1): Remove.
+
+ * 1750a/1750a.c (real_value_to_target_single): New.
+ (real_value_to_target_double): New.
+ * 1750a/1750a.h (TARGET_FLOAT_FORMAT): New.
+ (REAL_VALUE_TO_TARGET_SINGLE): New.
+ (REAL_VALUE_TO_TARGET_DOUBLE): New.
+ * 1750a/1750a-protos.h: Update.
+
+ * 1750a/1750a.h, a29k/a29k.h, alpha/alpha.h, alpha/unicosmk.h,
+ alpha/vms.h, arc/arc.h, arm/aof.h, arm/aout.h, avr/avr.c,
+ avr/avr.h, c4x/c4x.h, clipper/clix.h, convex/convex.h, cris/cris.h,
+ d30v/d30v.h, dsp16xx/dsp16xx.c, dsp16xx/dsp16xx.h, elxsi/elxsi.h,
+ fr30/fr30.h, h8300/h8300.h, i370/i370.h, i386/i386.h, i386/i386elf.h,
+ i386/next.h, i386/ptx4-i.h, i386/sysv4.h, i860/fx2800.h, i860/i860.h,
+ i860/paragon.h, i860/sysv4.h, i960/i960-protos.h, i960/i960.c,
+ i960/i960.h, ia64/ia64.h, m32r/m32r.h, m68hc11/m68hc11.c,
+ m68hc11/m68hc11.h, m68k/3b1.h, m68k/altos3068.h, m68k/crds.h,
+ m68k/dpx2.h, m68k/hp320.h, m68k/m68k.h, m68k/mot3300.h, m68k/news.h,
+ m68k/next.h, m68k/next21.h, m68k/sgs.h, m68k/sun2o4.h, m68k/sun3.h,
+ m68k/tower-as.h, m88k/m88k.h, mcore/mcore.h, mips/mips-protos.h,
+ mips/mips.c, mips/mips.h, mmix/mmix-protos.h, mmix/mmix.c,
+ mmix/mmix.h, mn10200/mn10200.h, mn10300/mn10300.h, ns32k/encore.h,
+ ns32k/ns32k.h, pa/long_double.h, pa/pa.h, pdp11/pdp11.h, pj/pj.h,
+ romp/romp.c, romp/romp.h, rs6000/rs6000.h, s390/linux.h, sh/sh.h,
+ sparc/sparc.h, stormy16/stormy16.h, v850/v850.h, vax/vax.h,
+ vax/vaxv.h, we32k/we32k.h, doc/tm.texi: Remove ASM_OUTPUT_FLOAT,
+ ASM_OUTPUT_DOUBLE, ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_BYTE_FLOAT,
+ ASM_OUTPUT_SHORT_FLOAT, ASM_OUTPUT_THREE_QUARTER_FLOAT, and all
+ associated support routines.
+
Thu Dec 20 16:58:46 CET 2001 Jan Hubicka <jh@suse.cz>
* cfgcleanup.c (flow_find_cross_jump): Avoid incrementing of ninsns
extern int find_jmplbl PARAMS ((int));
extern int one_bit_set_p PARAMS ((int));
extern void check_section PARAMS ((enum section));
+
+extern long real_value_to_target_single PARAMS((double));
+extern void real_value_to_target_double PARAMS((double, long[]));
return b;
}
+\f
+/* Convert a REAL_VALUE_TYPE to the target float format:
+
+ MSB LSB MSB LSB
+ ------------------------------------------------------
+ |S| Mantissa | Exponent |
+ ------------------------------------------------------
+ 0 1 23 24 31
+
+*/
+
+long
+real_value_to_target_single(in)
+ REAL_VALUE_TYPE in;
+{
+ union {
+ double d;
+ struct {
+#if HOST_WORDS_BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+#endif
+ } s;
+ } ieee;
+
+ unsigned int mant;
+ int exp;
+
+ if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT)
+ abort ();
+
+ ieee.d = in;
+
+ /* Don't bother with NaN, Inf, 0 special cases, since they'll be handled
+ by the over/underflow code below. */
+ exp = ieee.s.exponent - 0x3ff;
+ mant = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29;
+
+ /* The sign is actually part of the mantessa. Since we're comming from
+ IEEE we know that either bit 23 is set or we have a zero. */
+ if (! ieee.s.negative)
+ {
+ mant >>= 1;
+ exp += 1;
+ }
+
+ /* Check for overflow. Crop to FLT_MAX. */
+ if (exp > 127)
+ {
+ exp = 127;
+ mant = (ieee.s.negative ? 0xffffff : 0x7fffff);
+ }
+ /* Underflow to zero. */
+ else if (exp < -128)
+ {
+ exp = 0;
+ mant = 0;
+ }
+
+ return mant << 8 | (exp & 0xff);
+}
+/* Convert a REAL_VALUE_TYPE to the target 1750a extended float format:
+
+ ----------------------------------------------------
+ | | Mantissa | | Mantissa |
+ |S| MS |Exponent| LS |
+ ----------------------------------------------------
+ 0 1 23 24 31 32 47
+
+*/
+
+void
+real_value_to_target_double(in, out)
+ REAL_VALUE_TYPE in;
+ long out[];
+{
+ union {
+ double d;
+ struct {
+#if HOST_WORDS_BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+#endif
+ } s;
+ } ieee;
+
+ unsigned int mant_h24, mant_l16;
+ int exp;
+
+ if (HOST_FLOAT_FORMAT != IEEE_FLOAT_FORMAT)
+ abort ();
+
+ ieee.d = in;
+
+ /* Don't bother with NaN, Inf, 0 special cases, since they'll be handled
+ by the over/underflow code below. */
+ exp = ieee.s.exponent - 0x3ff;
+ mant_h24 = 1 << 23 | ieee.s.mantissa0 << 3 | ieee.s.mantissa1 >> 29;
+ mant_l16 = (ieee.s.mantissa1 >> 13) & 0xffff;
+
+ /* The sign is actually part of the mantessa. Since we're comming from
+ IEEE we know that either bit 23 is set or we have a zero. */
+ if (! ieee.s.negative)
+ {
+ mant_l16 = mant_l16 >> 1 | (mant_h24 & 1) << 15;
+ mant_h24 >>= 1;
+ exp += 1;
+ }
+
+ /* Check for overflow. Crop to DBL_MAX. */
+ if (exp > 127)
+ {
+ exp = 127;
+ mant_h24 = (ieee.s.negative ? 0xffffff : 0x7fffff);
+ mant_l16 = 0xffff;
+ }
+ /* Underflow to zero. */
+ else if (exp < -128)
+ {
+ exp = 0;
+ mant_h24 = 0;
+ mant_l16 = 0;
+ }
+
+ out[0] = mant_h24 << 8 | (exp & 0xff);
+ out[1] = mant_l16;
+}
/* Type to use for `size_t'. If undefined, uses `long unsigned int'. */
#define SIZE_TYPE "int"
-/* 1750a preliminary
- #define TARGET_FLOAT_FORMAT UNKNOWN_FLOAT_FORMAT
-*/
+/* 1750a preliminary. Ought to properly define the format in real.c. */
+#define TARGET_FLOAT_FORMAT UNKNOWN_FLOAT_FORMAT
/* Allocation boundary (in *bits*) for storing pointers in memory. */
#define POINTER_BOUNDARY 16
#define JUMP_TABLES_IN_TEXT_SECTION 1
-/* This is how to output an assembler line defining a 1750A `float'
- constant. */
-
-#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) \
- do { \
- if (label_pending) { \
- label_pending = 0; \
- sprintf (datalbl[datalbl_ndx].value, "%f", (double) VALUE); \
- } \
- datalbl[datalbl_ndx].size += 2; \
- fprintf (FILE, "\tdataf\t%f\n",VALUE); \
- } while(0)
-
-/* This is how to output an assembler line defining a 1750A `double'
- constant. */
-
-#define ASM_OUTPUT_THREE_QUARTER_FLOAT(FILE,VALUE) \
- do { \
- if (label_pending) { \
- label_pending = 0; \
- sprintf (datalbl[datalbl_ndx].value, "%f", VALUE); \
- } \
- datalbl[datalbl_ndx].size += 3; \
- fprintf(FILE,"\tdataef\t%f\n",VALUE); \
- } while (0)
-
/* This is how to output an assembler line defining a string constant. */
#define ASM_OUTPUT_ASCII(FILE, PTR, LEN) do { \
'Q': print a 1750 Base-Register-with-offset instruction's operands
*/
-/* 1750A: see file aux-output.c */
#define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE)
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE,ADDR)
+/* Convert a REAL_VALUE_TYPE to the target 1750a float format. */
+#define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \
+ ((OUT) = real_value_to_target_single(IN))
+
+/* Convert a REAL_VALUE_TYPE to the target 1750a extended float format. */
+#define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \
+ real_value_to_target_double((IN), (OUT))
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.double %.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf (FILE, "\t.float %.20e\n", (VALUE))
-
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
#define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \
((OVERFLOW) = check_float_value (MODE, &D, OVERFLOW))
-/* This is how to output an assembler line defining a `long double'
- constant. */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
- do { \
- long t[4]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.quad 0x%lx%08lx,0x%lx%08lx\n", \
- t[1] & 0xffffffff, t[0] & 0xffffffff, \
- t[3] & 0xffffffff, t[2] & 0xffffffff); \
- } while (0)
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.quad 0x%lx%08lx\n", \
- t[1] & 0xffffffff, t[0] & 0xffffffff); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
- } while (0)
-
/* We use the default ASCII-output routine, except that we don't write more
than 50 characters since the assembler doesn't support very long lines. */
#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \
ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#ifdef REAL_ARITHMETIC
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.quad ^X%lx%08lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff); \
- } while (0)
-#else
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.quad ^X%lx\n", t[0]); \
- } while(0)
-#endif
-
-
-/* This is how to output an assembler line defining a `long double'
- constant. `long double' and `double' are the same on the Cray T3E. */
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
- ASM_OUTPUT_DOUBLE (FILE,VALUE)
-
-/* This is how to output an assembler line defining a `float' constant.
- ??? Somehow, REAL_VALUE_TO_TARGET_SINGLE gets confused and returns the
- value in the upper bits of the int. */
-
-#undef ASM_OUTPUT_FLOAT
-#ifdef REAL_ARITHMETIC
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long ^X%lx\n", t & 0xffffffff);\
- } while (0)
-#else
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long ^X%lx\n", (t >> 32) & 0xffffffff);\
- } while(0)
-#endif
-
/* CAM has some restrictions with respect to string literals. It won't
accept lines with more that 256 characters which means that we have
to split long strings. Moreover, it only accepts escape sequences of
ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
}
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
- } \
- else \
- { \
- char str[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.%c_floating %s\n", (TARGET_FLOAT_VAX)?'f':'s', str); \
- } \
- }
-
#define LINK_SECTION_ASM_OP "\t.link"
#define READONLY_SECTION_ASM_OP "\t.rdata"
#define LITERALS_SECTION_ASM_OP "\t.literals"
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
-{ \
- long t; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n", \
- t, ASM_COMMENT_START, str); \
-}
-
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
-{ \
- long t[2]; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \
- t[0], ASM_COMMENT_START, str, t[1]); \
-}
-
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
#define ASM_OUTPUT_LABEL(FILE, NAME) \
#define ASM_APP_OFF ""
-#define ASM_OUTPUT_LONG_DOUBLE(STREAM,VALUE) \
- ASM_OUTPUT_DOUBLE((STREAM),(VALUE))
-
-#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
-do { \
- char dstr[30]; \
- long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), l); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.14g", dstr); \
- fprintf ((STREAM), "\tDCD &%lx, &%lx\t%s double %s\n", \
- l[0], l[1], ASM_COMMENT_START, dstr); \
-} while (0)
-
-#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
-do { \
- char dstr[30]; \
- long l; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), l); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.7g", dstr); \
- fprintf ((STREAM), "\tDCD &%lx\t%s double %s\n", \
- l, ASM_COMMENT_START, dstr); \
-} while (0)
-
#define ASM_OUTPUT_ASCII(STREAM,PTR,LEN) \
{ \
int i; \
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
asm_fprintf (STREAM, "\tb\t%LL%d\n", VALUE)
-/* Output various types of constants. For real numbers we output hex, with
- a comment containing the "human" value, this allows us to pass NaN's which
- the riscix assembler doesn't understand (it also makes cross-assembling
- less likely to fail). */
-
-#define ASM_OUTPUT_LONG_DOUBLE(STREAM, VALUE) \
- do \
- { \
- char dstr[30]; \
- long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
- asm_fprintf (STREAM, \
- "\t.long 0x%lx,0x%lx,0x%lx\t%@ long double %s\n", \
- l[0], l[1], l[2], dstr); \
- } \
- while (0)
-
-#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
- do \
- { \
- char dstr[30]; \
- long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.14g", dstr); \
- asm_fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%@ double %s\n", l[0],\
- l[1], dstr); \
- } \
- while (0)
-
-#define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
- do \
- { \
- char dstr[30]; \
- long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.7g", dstr); \
- asm_fprintf (STREAM, "\t.word 0x%lx\t%@ float %s\n", l, \
- dstr); \
- } \
- while (0)
-
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
output_ascii_pseudo_op (STREAM, (const unsigned char *)(PTR), LEN)
return default_assemble_integer (x, size, aligned_p);
}
-
-/* Output real N to file FILE */
-
-void
-asm_output_float (file, n)
- FILE *file;
- REAL_VALUE_TYPE n;
-{
- long val;
- char dstr[100];
-
- REAL_VALUE_TO_TARGET_SINGLE (n, val);
- REAL_VALUE_TO_DECIMAL (n, "%g", dstr);
- fprintf (file, "\t.long 0x%08lx\t/* %s */\n", val, dstr);
-}
-
/* Sets section name for declaration DECL */
void
Objective C program. */
-
-#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) fprintf (STREAM, "no double float %.20e\n", VALUE)
-#define ASM_OUTPUT_FLOAT(STREAM, VALUE) asm_output_float (STREAM, VALUE)
-/* `ASM_OUTPUT_LONG_DOUBLE (STREAM, VALUE)'
- `ASM_OUTPUT_THREE_QUARTER_FLOAT (STREAM, VALUE)'
- `ASM_OUTPUT_SHORT_FLOAT (STREAM, VALUE)'
- `ASM_OUTPUT_BYTE_FLOAT (STREAM, VALUE)'
- A C statement to output to the stdio stream STREAM an assembler
- instruction to assemble a floating-point constant of `TFmode',
- `DFmode', `SFmode', `TQFmode', `HFmode', or `QFmode',
- respectively, whose value is VALUE. VALUE will be a C expression
- of type `REAL_VALUE_TYPE'. Macros such as
- `REAL_VALUE_TO_TARGET_DOUBLE' are useful for writing these
- definitions. */
-
-
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)
/* `ASM_OUTPUT_ASCII (STREAM, PTR, LEN)'
output_ascii (FILE, P, SIZE)
#define ASM_APP_ON ""
#define ASM_APP_OFF ""
-/* Output float/double constants QFmode. */
-
-#define ASM_OUTPUT_BYTE_FLOAT(FILE, VALUE) \
- do { \
- long l; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- REAL_VALUE_TO_DECIMAL (VALUE, "%20lf", str); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.word\t0%08xh\t; %s\n", (int) l, str);\
- else \
- fprintf (FILE, "\t.word\t0%08lxh\t; %s\n", l, str);\
- } while (0);
-
-/* Output long double constants HFmode.
- The first word contains the exponent and first part of the mantissa
- in the same manner as QFmode. The second word contains the full
- mantissa. We should ensure that the two words are allocated within
- the same page for the large memory model since we only output a single
- LDP instruction. FIXME. The simplest solution probably is to output
- a LDP for each load. */
-
-#define ASM_OUTPUT_SHORT_FLOAT(FILE, VALUE) \
- do { \
- long l[2]; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- REAL_VALUE_TO_DECIMAL (VALUE, "%20lf", str); \
- l[1] = (l[0] << 8) | ((l[1] >> 24) & 0xff); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.word\t0%08xh\t; %s\n\t.word\t0%08xh\n", \
- (int) l[0], str, (int) l[1]); \
- else \
- fprintf (FILE, "\t.word\t0%08lxh\t; %s\n\t.word\t0%08lxh\n", \
- l[0], str, l[1]); \
- } while (0);
-
#define ASM_OUTPUT_ASCII(FILE, PTR, LEN) c4x_output_ascii (FILE, PTR, LEN)
/* Output and Generation of Labels. */
fputs ("\n", (FILE)); \
} while (0)
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-{ \
- union { int i[2]; double d; } _d_; \
- _d_.d = VALUE; \
- fprintf (FILE, "\t.long 0x%08x,0x%08x\n", _d_.i[0],_d_.i[1]); \
-}
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-{ \
- union { int i; float f; } _f_; \
- _f_.f = VALUE; \
- fprintf (FILE, "\t.long 0x%08x\n", _f_.i); \
-}
-
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- outfloat (FILE, VALUE, "%.17e", "\tds.d ", "\n")
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- outfloat (FILE, VALUE, "%.9e", "\tds.s ", "\n")
-
/* This is how to output a string */
#define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do { \
/* Node: Data Output */
-/* We must use REAL_VALUE_TO_TARGET_SINGLE and
- REAL_VALUE_TO_TARGET_LONG_DOUBLE. It seems real.h cannot support when
- target-double is target-single is 32bit-single. */
-#define ASM_OUTPUT_LONG_DOUBLE(FILE, VALUE) \
- do \
- { \
- long l[2]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "\t.dword 0x%lx\n", l[0]); \
- fprintf (FILE, "\t.dword 0x%lx\n", l[1]); \
- } \
- while (0)
-
-/* FIXME: The manual says "array of long:s", but
- REAL_VALUE_TO_TARGET_SINGLE actually writes a long. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- do \
- { \
- long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf (FILE, "\t.dword 0x%lx\n", l); \
- } \
- while (0)
-
-/* This is what is used by gcc for 64-bit floats,
- not the "long double" one. */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- ASM_OUTPUT_LONG_DOUBLE (FILE, VALUE)
-
-
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) (C) == '@'
/* Node: Uninitialized Data */
\f
/* Output of Data. */
-/* A C statement to output to the stdio stream STREAM an assembler instruction
- to assemble a floating-point constant of `TFmode', `DFmode', `SFmode',
- `TQFmode', `HFmode', or `QFmode', respectively, whose value is VALUE. VALUE
- will be a C expression of type `REAL_VALUE_TYPE'. Macros such as
- `REAL_VALUE_TO_TARGET_DOUBLE' are useful for writing these definitions. */
-
-/* #define ASM_OUTPUT_LONG_DOUBLE(STREAM, VALUE) */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff); \
- } \
- else \
- { \
- char str[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", str); \
- fprintf (FILE, "\t.double 0d%s\n", str); \
- } \
- }
-
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
- } \
- else \
- { \
- char str[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.float 0d%s\n", str); \
- } \
- }
-
-/* #define ASM_OUTPUT_THREE_QUARTER_FLOAT(STREAM, VALUE) */
-/* #define ASM_OUTPUT_SHORT_FLOAT(STREAM, VALUE) */
-/* #define ASM_OUTPUT_BYTE_FLOAT(STREAM, VALUE) */
-
/* A C statement to output to the stdio stream STREAM an assembler instruction
to assemble a string constant containing the LEN bytes at PTR. PTR will be
a C expression of type `char *' and LEN a C expression of type `int'.
fprintf (file, "int\n");
}
-void
-asm_output_float (file, fp_const)
- FILE *file;
- double fp_const;
-{
-#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- REAL_VALUE_TYPE d = fp_const;
- long value;
-
- REAL_VALUE_TO_TARGET_SINGLE (d, value);
- fputs ("\tint ", file);
-#ifdef WORDS_BIG_ENDIAN
- fprintf (file, "0x%-4.4lx, 0x%-4.4lx", (value >> 16) & 0xffff,
- value & 0xffff);
-#else
- fprintf (file, "0x%-4.4lx, 0x%-4.4lx", value & 0xffff,
- (value >> 16) & 0xffff);
-#endif
- fputs ("\n", file);
-#else
- fatal_error ("inline float constants not supported on this host");
-#endif
-}
-
int
dsp16xx_address_cost (addr)
rtx addr;
\f
/* OUTPUT OF DATA */
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) asm_output_float (FILE,VALUE)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE)
-
-/* This is how to output an assembler line defining a 'float' constant of
- size HFmode. */
-#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE)
-
/* This is how we output a 'c' character string. For the 16xx
assembler we have to do it one letter at a time */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, ".%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant.
- It is .dfloat or .gfloat, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-{ union {double d; int i[2]; } tem; \
- tem.d = (VALUE); \
- fprintf (FILE, "\t.data\t%d{32}, %d{32}\n", tem.i[0], tem.i[1]); }
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-{ union {float f; int i; } tem; \
- tem.f = (VALUE); \
- fprintf (FILE, "\t.data %d{32}\n", tem.i); }
-
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
for ordinary compiler output. */
#define ASM_APP_OFF "#NO_APP\n"
-/*}}}*/ \f
-/*{{{ Output of Data. */
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- do \
- { \
- long t; \
- char str[30]; \
- \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n", \
- t, ASM_COMMENT_START, str); \
- } \
- while (0)
-
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- do \
- { \
- long t[2]; \
- char str[30]; \
- \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \
- t[0], ASM_COMMENT_START, str, t[1]); \
- } \
- while (0)
/*}}}*/ \f
/*{{{ Output and Generation of Labels. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
sprintf (LABEL, "*.%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant.
- It is .dfloat or .gfloat, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- do \
- { \
- char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double %s\n", dstr); \
- } \
- while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- do \
- { \
- char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.float %s\n", dstr); \
- } \
- while (0)
-
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
fprintf (FILE, "\tL\t%s,%d(13)\n\tLA\t13,4(13)\n", \
reg_names[REGNO], STACK_POINTER_OFFSET)
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- fprintf (FILE, "\tDC\tD'%.18G'\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- fprintf (FILE, "\tDC\tE'%.9G'\n", (VALUE))
-
/* This outputs a text string. The string are chopped up to fit into
an 80 byte record. Also, control and special characters, interpreted
by the IBM assembler, are output numerically. */
#define ASM_DOUBLE "\t.double"
-/* Argument to the flt pt. macros is a REAL_VALUE_TYPE which
- may or may not be a float/double, depending on whther we
- are running in cross-compiler mode. */
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE, RVAL) { \
- char buf[50]; \
- REAL_VALUE_TO_DECIMAL (RVAL, HOST_WIDE_INT_PRINT_DOUBLE_HEX, buf); \
- fprintf (FILE, "\tDC\tD'%s'\n", buf); \
-}
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, RVAL) { \
- char buf[50]; \
- REAL_VALUE_TO_DECIMAL (RVAL, HOST_WIDE_INT_PRINT_DEC, buf); \
- fprintf (FILE, "\tDC\tE'%s'\n", buf); \
-}
-
-
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
#define ASM_OUTPUT_LABEL(FILE,NAME) \
#define ASM_OUTPUT_LABEL(FILE,NAME) \
(assemble_name (FILE, NAME), fputs (":\n", FILE))
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "%s0x%lx,0x%lx\n", ASM_LONG, l[0], l[1]); \
- } while (0)
-
-/* This is how to output a `long double' extended real constant. */
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[4]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- if (TARGET_128BIT_LONG_DOUBLE) \
- fprintf (FILE, "%s0x%lx,0x%lx,0x%lx,0x0\n", ASM_LONG, l[0], l[1], l[2]); \
- else \
- fprintf (FILE, "%s0x%lx,0x%lx,0x%lx\n", ASM_LONG, l[0], l[1], l[2]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf ((FILE), "%s0x%lx\n", ASM_LONG, l); \
- } while (0)
-
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.
LABELNO is an integer which is different for each call. */
%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
crtbegin.o%s"
-/* This is how to output assembly code to define a `float' constant.
- We always have to use a .long pseudo-op to do this because the native
- SVR4 ELF assembler is buggy and it generates incorrect values when we
- try to use the .float pseudo-op instead. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long value; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value); \
- else \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value); \
- } while (0)
-
-/* This is how to output assembly code to define a `double' constant.
- We always have to use a pair of .long pseudo-ops to do this because
- the native SVR4 ELF assembler is buggy and it generates incorrect
- values when we try to use the the .double pseudo-op instead. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long value[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- } \
- } while (0)
-
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long value[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[2]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[2]); \
- } \
- } while (0)
-
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \
? FIRST_FLOAT_REG : 0)
-#ifdef REAL_VALUE_TO_TARGET_LONG_DOUBLE
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
- do { \
- long hex[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, hex); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n\t.long 0x%x\n", \
- (int) hex[0], (int) hex[1], (int) hex[2]); \
- else \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n\t.long 0x%lx\n", \
- hex[0], hex[1], hex[2]); \
- } while (0)
-#endif
-
-#ifdef REAL_VALUE_TO_TARGET_DOUBLE
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { \
- long hex[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", \
- (int) hex[0], (int) hex[1]); \
- else \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", hex[0], hex[1]); \
- } while (0)
-#endif
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#ifdef REAL_VALUE_TO_TARGET_SINGLE
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { \
- long hex; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.long 0x%x\n", (int) hex); \
- else \
- fprintf (FILE, "\t.long 0x%lx\n", hex); \
- } while (0)
-#endif
-
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
variable of type `char *' which points to the opcode name in its
#define CPP_PREDEFINES \
"-Dunix -D_SEQUENT_ -Asystem=unix -Asystem=ptx4"
-/* This is how to output assembly code to define a `float' constant.
- We always have to use a .long pseudo-op to do this because the native
- SVR4 ELF assembler is buggy and it generates incorrect values when we
- try to use the .float pseudo-op instead. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long value; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value); \
- else \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value); \
- } while (0)
-
-/* This is how to output assembly code to define a `double' constant.
- We always have to use a pair of .long pseudo-ops to do this because
- the native SVR4 ELF assembler is buggy and it generates incorrect
- values when we try to use the .double pseudo-op instead. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long value[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- } \
- } while (0)
-
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long value[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[2]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[2]); \
- } \
- } while (0)
-
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
#define CPP_PREDEFINES \
"-Dunix -D__svr4__ -Asystem=unix -Asystem=svr4"
-/* This is how to output assembly code to define a `float' constant.
- We always have to use a .long pseudo-op to do this because the native
- SVR4 ELF assembler is buggy and it generates incorrect values when we
- try to use the .float pseudo-op instead. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long value; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value); \
- else \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value); \
- } while (0)
-
-/* This is how to output assembly code to define a `double' constant.
- We always have to use a pair of .long pseudo-ops to do this because
- the native SVR4 ELF assembler is buggy and it generates incorrect
- values when we try to use the .double pseudo-op instead. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long value[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- } \
- } while (0)
-
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long value[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
- if (sizeof (int) == sizeof (long)) \
- { \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[0]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[1]); \
- fprintf((FILE), "%s0x%x\n", ASM_LONG, (int) value[2]); \
- } \
- else \
- { \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[0]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[1]); \
- fprintf((FILE), "%s0x%lx\n", ASM_LONG, value[2]); \
- } \
- } while (0)
-
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "//"
-/* Use definitions of ASM_OUTPUT_{DOUBLE,FLOAT} as given in i860.h */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf(FILE, "\t.double %.20e\n", (VALUE))
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf(FILE, "\t.float %.12e\n", (VALUE))
-
#undef ASM_FILE_START
#define ASM_FILE_START(FILE)
#undef ASM_OUTPUT_FUNCTION_PREFIX
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*.%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.double %.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf (FILE, "\t.float %.12e\n", (VALUE))
-
/* This is how to output code to push a register on the stack.
It need not be very fast code. */
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "//\t.ident \"%s\"\n", NAME);
-/*
- * the assembler doesn't grok .double INF and the like
- * but does understand .long with hex numbers, so special
- * case the "symbolic" IEEE numbers.
- */
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t[0], t[1]); \
- } \
- else \
- fprintf (FILE, "\t.double %.20e\n", VALUE); \
- }
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t); \
- } \
- else \
- fprintf (FILE, "\t.float %.12e\n", VALUE); \
- }
-
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do \
fprintf (FILE, "]@%s", PART_CODE); \
} while (0)
-/* If the host and target formats match, output the floats as hex. */
-#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
-#if defined (HOST_WORDS_BIG_ENDIAN) == WORDS_BIG_ENDIAN
-
-/* This is how to output an assembler line defining a `double' constant.
- Note that the native i860/svr4 ELF assembler can't properly handle
- infinity. It generates an incorrect (non-infinity) value when given
- `.double 99e9999' and it doesn't grok `inf' at all. It also mishandles
- NaNs and -0.0. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", t[0], t[1]); \
- } \
- else \
- fprintf (FILE, "\t.double %.20e\n", VALUE); \
- }
-
-/* This is how to output an assembler line defining a `float' constant.
- Note that the native i860/svr4 ELF assembler can't properly handle
- infinity. It actually generates an assembly time error when given
- `.float 99e9999' and it doesn't grok `inf' at all. It also mishandles
- NaNs and -0.0. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE) \
- || REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.word 0x%lx\n", t); \
- } \
- else \
- fprintf (FILE, "\t.float %.12e\n", VALUE); \
- }
-
-#endif /* word order matches */
-#endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */
-
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { output_file_directive (FILE, main_input_filename); \
extern int i960_reg_parm_stack_space PARAMS ((tree));
#endif /* TREE_CODE */
-#ifdef REAL_VALUE_TYPE
-extern void i960_output_long_double PARAMS ((FILE *, REAL_VALUE_TYPE));
-extern void i960_output_double PARAMS ((FILE *, REAL_VALUE_TYPE));
-extern void i960_output_float PARAMS ((FILE *, REAL_VALUE_TYPE));
-#endif /* REAL_VALUE_TYPE */
-
extern int process_pragma PARAMS ((int(*)(void), void(*)(int), const char *));
extern int i960_object_bytes_bitalign PARAMS ((int));
extern void i960_initialize PARAMS ((void));
return ret;
}
\f
-/* Floating-point support. */
-
-void
-i960_output_long_double (file, value)
- FILE *file;
- REAL_VALUE_TYPE value;
-{
- long value_long[3];
- char dstr[30];
-
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (value, value_long);
- REAL_VALUE_TO_DECIMAL (value, "%.20g", dstr);
-
- fprintf (file,
- "\t.word\t0x%08lx\t\t# %s\n\t.word\t0x%08lx\n\t.word\t0x%08lx\n",
- value_long[0], dstr, value_long[1], value_long[2]);
- fprintf (file, "\t.word\t0x0\n");
-}
-
-void
-i960_output_double (file, value)
- FILE *file;
- REAL_VALUE_TYPE value;
-{
- long value_long[2];
- char dstr[30];
-
- REAL_VALUE_TO_TARGET_DOUBLE (value, value_long);
- REAL_VALUE_TO_DECIMAL (value, "%.20g", dstr);
-
- fprintf (file, "\t.word\t0x%08lx\t\t# %s\n\t.word\t0x%08lx\n",
- value_long[0], dstr, value_long[1]);
-}
-
-void
-i960_output_float (file, value)
- FILE *file;
- REAL_VALUE_TYPE value;
-{
- long value_long;
- char dstr[30];
-
- REAL_VALUE_TO_TARGET_SINGLE (value, value_long);
- REAL_VALUE_TO_DECIMAL (value, "%.12g", dstr);
-
- fprintf (file, "\t.word\t0x%08lx\t\t# %s (float)\n", value_long, dstr);
-}
-\f
/* Return the number of bits that an object of size N bytes is aligned to. */
int
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `long double'
- constant. */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) i960_output_long_double(FILE, VALUE)
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) i960_output_double(FILE, VALUE)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) i960_output_float(FILE, VALUE)
-
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
fprintf (FILE, "\tst\t%s,(sp)\n\taddo\t4,sp,sp\n", reg_names[REGNO])
\f
/* Output of Data. */
-/* A C statement to output to the stdio stream STREAM an assembler instruction
- to assemble a floating-point constant of `TFmode', `DFmode', `SFmode',
- respectively, whose value is VALUE. */
-
-/* ??? Must reverse the word order for big-endian code? */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE, VALUE) \
-do { \
- long t[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, t); \
- fprintf (FILE, "\tdata4 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff, t[2] & 0xffffffff, 0L);\
-} while (0)
-
-/* ??? Must reverse the word order for big-endian code? */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, t); \
- fprintf (FILE, "\tdata8 0x%08lx%08lx\n", \
- t[1] & 0xffffffff, t[0] & 0xffffffff); \
-} while (0)
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, t); \
- fprintf (FILE, "\tdata4 0x%lx\n", t & 0xffffffff); \
-} while (0)
-
/* This is how to output an assembler line defining a `char' constant
to an xdata segment. */
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- do \
- { \
- long t; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n", \
- t, ASM_COMMENT_START, str); \
- } \
- while (0)
-
-/* This is how to output an assembler line defining a `double' constant. */
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- do \
- { \
- long t[2]; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \
- t[0], ASM_COMMENT_START, str, t[1]); \
- } \
- while (0)
-
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
/* On the M32R we need to ensure the next instruction starts on a 32 bit
else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == SFmode)
{
REAL_VALUE_TYPE r;
+ long l;
+
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
- ASM_OUTPUT_FLOAT_OPERAND (letter, file, r);
- }
- else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == XFmode)
- {
- REAL_VALUE_TYPE r;
- REAL_VALUE_FROM_CONST_DOUBLE (r, op);
- ASM_OUTPUT_LONG_DOUBLE_OPERAND (file, r);
+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
+ asm_fprintf (file, "%I0x%lx", l);
}
- else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == DFmode)
+ else if (GET_CODE (op) == CONST_DOUBLE
+ && (GET_MODE (op) == DFmode || GET_MODE (op) == XFmode))
{
REAL_VALUE_TYPE r;
+ char dstr[30];
+
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
- ASM_OUTPUT_DOUBLE_OPERAND (file, r);
+ REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr);
+ asm_fprintf (file, "%I0r%s", dstr);
}
else
{
/* Output #ident as a .ident. */
-/* This is how to output a `long double' extended real constant. */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
- ASM_OUTPUT_DOUBLE(FILE,VALUE)
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\t%s\t0x%lx,0x%lx\n", \
- integer_asm_op (4, TRUE), l[0], l[1]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- assemble_aligned_integer (4, GEN_INT (l)); \
- } while (0)
-
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
"*_.frame", "*_.tmp", "*_.z", "*_.xy", "*fake clobber", \
SOFT_REG_NAMES, "*sframe", "*ap"}
-
-/* Output a float value (represented as a C double) as an immediate operand.
- This macro is a 68k-specific macro. */
-
-#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
- do { \
- long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- asm_fprintf ((FILE), "%I0x%lx", l); \
- } while (0)
-
-/* Output a double value (represented as a C double) as an immediate operand.
- This macro is a 68k-specific macro. */
-#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
- asm_fprintf (FILE, "%I0r%s", dstr); \
- } while (0)
-
-/* Note, long double immediate operands are not actually
- generated by m68k.md. */
-#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)
-
/* Print an instruction operand X on file FILE. CODE is the code from the
%-spec for printing this operand. If `%z3' was used to print operand
3, then CODE is 'z'. */
#undef TARGET_VERSION
#undef ASM_FORMAT_PRIVATE_NAME
-#undef ASM_OUTPUT_DOUBLE
-#undef ASM_OUTPUT_FLOAT
#undef ASM_OUTPUT_ALIGN
#undef ASM_OUTPUT_SOURCE_FILENAME
#undef ASM_OUTPUT_SOURCE_LINE
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \
sprintf ((OUTPUT), "%s_%%%d", (NAME), (LABELNO)))
-/* The unixpc doesn't know about double's and float's */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tlong 0x%lx,0x%lx\n", l[0], l[1]); \
- } while (0)
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf ((FILE), "\tlong 0x%lx\n", l); \
- } while (0)
-
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
do { \
if ((LOG) == 1) \
#define USE_GAS
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
- fprintf (FILE, "\t.single 0r%s\n", dstr); \
- } while (0)
-
#undef ASM_OUTPUT_FLOAT_OPERAND
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
do { \
#undef IMMEDIATE_PREFIX
#define IMMEDIATE_PREFIX "$"
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\t.long 0x%lx, 0x%lx\n", l[0], l[1]); \
- } while (0)
-
/*unos has no .skip :-( */
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
} \
}
-/* This is how to output a `long double' extended real constant. */
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\tdc.l $%x,$%x,$%x\n", (int)l[0], (int)l[1], (int)l[2]); \
- else \
- fprintf (FILE, "\tdc.l $%lx,$%lx,$%lx\n", l[0], l[1], l[2]); \
- } while (0)
-
-#undef ASM_OUTPUT_DOUBLE
-#if 0
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
- fprintf (FILE, "\tdc.d %s\n", dstr); \
- } while (0)
-#endif
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tdc.l $%lx,$%lx\n", l[0], l[1]); \
- } while (0)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\tdc.l $%x\n", (int) l); \
- else \
- fprintf (FILE, "\tdc.l $%lx\n", l); \
- } while (0)
-
/* This is how to output an element of a case-vector that is absolute.
(The 68000 does not use such vectors,
but we must define this macro anyway.) */
#undef TEXT_SECTION_ASM_OP
#undef DATA_SECTION_ASM_OP
#undef READONLY_DATA_SECTION
-#undef ASM_OUTPUT_DOUBLE
-#undef ASM_OUTPUT_FLOAT
#undef ASM_OUTPUT_ADDR_VEC_ELT
#undef ASM_OUTPUT_ADDR_DIFF_ELT
#undef ASM_OUTPUT_ALIGN
fprintf (FILE, "%s%d:\n", PREFIX, NUM); \
} while(0)
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
- fprintf (FILE, "\tdouble 0f%s\n", dstr); \
- } while (0)
-
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \
- fprintf (FILE, "\tfloat 0f%s\n", dstr); \
- } while (0)
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \
- } while (0)
-
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
fprintf (FILE, "\tlong L%d\n", VALUE)
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM))
-/* This is how to output a `long double' extended real constant. */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "\t.long 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf (FILE, "\t.long 0x%lx\n", l); \
- } while (0)
-
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
#define INT_OP_GROUP INT_OP_NO_DOT
#endif
-/* The sysV68 as doesn't know about double's and float's. */
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf ((FILE), "%s0x%lx,0x%lx\n", \
- integer_asm_op (4, TRUE), l[0], l[1]); \
- } while (0)
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", \
- integer_asm_op (4, TRUE), l[0], l[1], l[2]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- assemble_aligned_integer (4, GEN_INT (l)); \
- } while (0)
-
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
#undef REGISTER_NAMES
#undef ASM_OUTPUT_REG_PUSH
#undef ASM_OUTPUT_REG_POP
-#undef ASM_OUTPUT_DOUBLE
#undef ASM_OUTPUT_SKIP
#undef ASM_FORMAT_PRIVATE_NAME
#endif
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO])
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double 0d%s\n", dstr); \
- } while (0)
-
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "\t.space %u\n", (SIZE))
(Why isn't this in m68k.h?) */
#define STRUCTURE_SIZE_BOUNDARY 16
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#ifdef REAL_VALUE_TO_TARGET_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { \
- long hex[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", hex[0], hex[1]); \
- } while (0)
-#else
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.double 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.double 0r99e999\n"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } \
- } while (0)
-#endif
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#ifdef REAL_VALUE_TO_TARGET_SINGLE
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { \
- long hex; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \
- fprintf (FILE, "\t.long 0x%lx\n", hex); \
- } while (0)
-#else
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.single 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.single 0r99e999\n"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.single 0r%s\n", dstr); \
- } \
- } while (0)
-#endif
#undef ASM_OUTPUT_FLOAT_OPERAND
#ifdef REAL_VALUE_TO_TARGET_SINGLE
/* for #include <mach.h> in libgcc2.c */
#define NeXTStep21
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "#0r-99e999"); \
- else \
- fprintf (FILE, "#0r99e999"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.single 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.single 0r99e999\n"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.single 0r%s\n", dstr); \
- } \
- } while (0)
-
/* called from m68k.c line 1881 */
#undef ASM_OUTPUT_FLOAT_OPERAND
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
#endif /* defined SUPPORT_SUN_FPA */
-/* This is how to output an assembler line defining an `int' constant. */
-/* The SGS assembler doesn't understand ".word". */
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf ((FILE), "%s0x%lx,0x%lx,0x%lx\n", \
- integer_asm_op (4, TRUE), l[0], l[1], l[2]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf ((FILE), "%s0x%lx,0x%lx\n", \
- integer_asm_op (4, TRUE), l[0], l[1]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- assemble_aligned_integer (4, GEN_INT (l)); \
- } while (0)
-
/* This is how to output an assembler line that says to advance the
location counter to a multiple of 2**LOG bytes. */
#define LINK_SPEC \
"%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}"
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.double 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.double 0r99e999\n"); \
- } \
- else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- fprintf (FILE, "\t.long 0x80000000,0\n"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.single 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.single 0r99e999\n"); \
- } \
- else if (REAL_VALUE_MINUS_ZERO (VALUE)) \
- { \
- fprintf (FILE, "\t.long 0x80000000\n"); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.single 0r%s\n", dstr); \
- } \
- } while (0)
-
#undef ASM_OUTPUT_FLOAT_OPERAND
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
do { \
#define FUNCTION_VALUE(VALTYPE,FUNC) FUNCTION_VALUEX (TYPE_MODE (VALTYPE))
#endif /* 0 */
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.double 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.double 0r99e999\n"); \
- } \
- else if (REAL_VALUE_ISNAN (VALUE)) \
- { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), l); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", l[0], l[1]); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.17g", dstr); \
- fprintf (FILE, "\t.double 0r%s\n", dstr); \
- } \
- }
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- { \
- if (REAL_VALUE_ISINF (VALUE)) \
- { \
- if (REAL_VALUE_NEGATIVE (VALUE)) \
- fprintf (FILE, "\t.single 0r-99e999\n"); \
- else \
- fprintf (FILE, "\t.single 0r99e999\n"); \
- } \
- else if (REAL_VALUE_ISNAN (VALUE)) \
- { long l; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), l); \
- fprintf (FILE, "\t.long 0x%lx\n", l); \
- } \
- else \
- { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
- fprintf (FILE, "\t.single 0r%s\n", dstr); \
- } \
- }
-
/* This is how to output an assembler lines defining floating operands.
There's no way to output a NaN's fraction, so we lose it. */
fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n", \
XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM)); \
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tlong 0x%lx,0x%lx\n", l[0], l[1]); \
- } while (0)
-
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long l[3]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \
- fprintf (FILE, "\tlong 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]); \
- } while (0)
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf ((FILE), "\tlong 0x%lx\n", l); \
- } while (0)
-
#undef ASM_OUTPUT_ADDR_VEC_ELT
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
fprintf (FILE, "\tlong L%%%d\n", (VALUE))
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, TARGET_SVR4 ? "*.%s%ld" : "*@%s%ld", PREFIX, (long)(NUM))
-/* Internal macro to get a single precision floating point value into
- an int, so we can print its value in hex. */
-#define FLOAT_TO_INT_INTERNAL( FVALUE, IVALUE ) \
- { union { \
- REAL_VALUE_TYPE d; \
- struct { \
- unsigned sign : 1; \
- unsigned exponent1 : 1; \
- unsigned exponent2 : 3; \
- unsigned exponent3 : 7; \
- unsigned mantissa1 : 20; \
- unsigned mantissa2 : 3; \
- unsigned mantissa3 : 29; \
- } s; \
- } _u; \
- \
- union { \
- int i; \
- struct { \
- unsigned sign : 1; \
- unsigned exponent1 : 1; \
- unsigned exponent3 : 7; \
- unsigned mantissa1 : 20; \
- unsigned mantissa2 : 3; \
- } s; \
- } _u2; \
- \
- _u.d = REAL_VALUE_TRUNCATE (SFmode, FVALUE); \
- _u2.s.sign = _u.s.sign; \
- _u2.s.exponent1 = _u.s.exponent1; \
- _u2.s.exponent3 = _u.s.exponent3; \
- _u2.s.mantissa1 = _u.s.mantissa1; \
- _u2.s.mantissa2 = _u.s.mantissa2; \
- IVALUE = _u2.i; \
- }
-
-/* This is how to output an assembler line defining a `double' constant.
- Use "word" pseudos to avoid printing NaNs, infinity, etc. */
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { \
- union { REAL_VALUE_TYPE d; long l[2]; } x; \
- x.d = (VALUE); \
- fprintf (FILE, "%s0x%.8lx, 0x%.8lx\n", \
- integer_asm_op (4, TRUE), \
- (long) x.l[0], (long) x.l[1]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { \
- int i; \
- FLOAT_TO_INT_INTERNAL (VALUE, i); \
- assemble_aligned_integer (4, GEN_INT (i)); \
- } while (0)
-
/* The single-byte pseudo-op is the default. Override svr[34].h. */
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) \
/* Output various types of constants. */
-/* This is how to output an assembler line defining a `double'. */
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do \
- { \
- char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double %s\n", dstr); \
- } \
- while (0)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do \
- { \
- char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.float %s\n", dstr); \
- } \
- while (0)
-
/* This is how to output an assembler line
that says to advance the location counter by SIZE bytes. */
#undef ASM_OUTPUT_SKIP
const char *, int));
extern void mips_expand_epilogue PARAMS ((void));
extern void mips_expand_prologue PARAMS ((void));
-#ifdef REAL_VALUE_TYPE
-extern void mips_output_double PARAMS ((FILE *, REAL_VALUE_TYPE));
-extern void mips_output_float PARAMS ((FILE *, REAL_VALUE_TYPE));
-#endif /* REAL_VALUE_TYPE */
extern void mips_output_filename PARAMS ((FILE *, const char *));
extern void mips_output_lineno PARAMS ((FILE *, int));
extern void mips_output_ascii PARAMS ((FILE *, const char *,
}
}
\f
-/* 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
-}
-\f
/* Return the bytes needed to compute the frame pointer from the current
stack pointer.
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf ((LABEL), "*%s%s%ld", (LOCAL_LABEL_PREFIX), (PREFIX), (long)(NUM))
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
- mips_output_double (STREAM, VALUE)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
- mips_output_float (STREAM, VALUE)
-
-
/* This is how to output an element of a case-vector that is absolute. */
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
extern int mmix_asm_preferred_eh_data_format PARAMS ((int, int));
extern void mmix_setup_frame_addresses PARAMS ((void));
-/* Need real.h */
-#ifdef GCC_REAL_H
-extern void mmix_asm_output_double PARAMS ((FILE *, REAL_VALUE_TYPE *));
-extern void mmix_asm_output_float PARAMS ((FILE *, REAL_VALUE_TYPE *));
-#endif /* GCC_REAL_H */
-
/*
* Local variables:
* eval: (c-set-style "gnu")
fprintf (stream, "\n");
}
-/* ASM_OUTPUT_DOUBLE. */
-
-void
-mmix_asm_output_double (stream, valuep)
- FILE * stream;
- REAL_VALUE_TYPE * valuep;
-{
- unsigned long bits[2];
- HOST_WIDEST_INT value;
-
- REAL_VALUE_TO_TARGET_DOUBLE (*valuep, (long *) bits);
- value
- = (((HOST_WIDEST_INT) bits[0]) << 32) | (HOST_WIDEST_INT) bits[1];
- mmix_output_octa (stream, value, 1);
-}
-
-/* ASM_OUTPUT_FLOAT. */
-
-void
-mmix_asm_output_float (stream, valuep)
- FILE * stream;
- REAL_VALUE_TYPE * valuep;
-{
- unsigned long bits;
-
- REAL_VALUE_TO_TARGET_SINGLE (*valuep, bits);
-
- fprintf (stream, "\tTETRA #%lx\n",
- (unsigned long) (bits
- & (((unsigned HOST_WIDEST_INT) (1 << 31) - 1) * 2
- + 1)));
-}
-
/* Target hook for assembling integer objects. Use mmix_print_operand
for WYDE and TETRA. Use mmix_output_octa to output 8-byte
CONST_DOUBLEs. */
/* Node: Data Output */
-#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
- mmix_asm_output_double (STREAM, &VALUE)
-
-#define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
- mmix_asm_output_float (STREAM, &VALUE)
-
#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
mmix_asm_output_ascii (STREAM, PTR, LEN)
-
/* Node: Uninitialized Data */
#define ASM_OUTPUT_ALIGNED_COMMON(ST, N, S, A) \
#define ASM_APP_OFF "#NO_APP\n"
-/* This is how to output an assembler line defining a `double' constant.
- It is .dfloat or .gfloat, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double %s\n", dstr); \
- } while (0)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.float %s\n", dstr); \
- } while (0)
-
/* This says how to output the assembler to define a global
uninitialized but not common symbol.
Try to use asm_output_bss to implement this macro. */
#define ASM_APP_OFF "#NO_APP\n"
-/* This is how to output an assembler line defining a `double' constant.
- It is .dfloat or .gfloat, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double %s\n", dstr); \
- } while (0)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.float %s\n", dstr); \
- } while (0)
-
/* This says how to output the assembler to define a global
uninitialized but not common symbol.
Try to use asm_output_bss to implement this macro. */
#undef ASM_OUTPUT_ADDR_DIFF_ELT
#undef ASM_OUTPUT_ALIGN
#undef ASM_OUTPUT_ASCII
-#undef ASM_OUTPUT_DOUBLE
#undef ASM_OUTPUT_INTERNAL_LABEL
#undef ASM_OUTPUT_LOCAL
#undef CPP_PREDEFINES
} while (0)
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.long 0f%.20e\n", (VALUE))
-
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( fputs ("\t.bss ", (FILE)), \
assemble_name ((FILE), (NAME)), \
/* Output of Data */
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.double 0d%.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf (FILE, "\t.float 0f%.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining an `int' constant. */
-
/* This is how to output an assembler line defining an external/static
address which is not in tree format (for collect.c). */
#define LONG_DOUBLE_TYPE_SIZE 128
-#undef ASM_OUTPUT_LONG_DOUBLE
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
-do { long value[4]; \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
- fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[0]); \
- fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[1]); \
- fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[2]); \
- fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[3]); \
- } while (0)
-
-
/* Define library calls for quad FP operations. These are all part of the
PA32 and PA64 ABIs. */
#define ADDTF3_LIBCALL "_U_Qfadd"
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM))
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- do { long l[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \
- fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", l[0], l[1]); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { long l; \
- REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
- fprintf (FILE, "\t.word 0x%lx\n", l); \
- } while (0)
-
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
do { \
/* We only handle DATA objects here, functions are globalized in \
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s_%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\tdouble %.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf (FILE, "\tfloat %.12e\n", (VALUE))
-
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) \
output_ascii (FILE, P, SIZE)
/* Output various types of constants. */
-/* This is how to output an assembler line defining a `double'. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((FILE), "\t.double %s\n", dstr); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((FILE), "\t.float %s\n", dstr); \
- } while (0)
-
/* This is how to output an assembler line
that says to advance the location counter by SIZE bytes. */
union real_extract u;
memcpy (&u, &CONST_DOUBLE_LOW (immed[i]), sizeof u);
- if (GET_MODE (immed[i]) == DFmode)
- ASM_OUTPUT_DOUBLE (file, u.d);
- else
- ASM_OUTPUT_FLOAT (file, u.d);
+ assemble_real (u.d, GET_MODE (immed[i]),
+ GET_MODE_ALIGNMENT (GET_MODE (immed[i])));
}
else
abort ();
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.double 0d%.20e\n", (VALUE))
-
-/* This is how to output an assembler line defining a `float' constant.
-
- WARNING: Believe it or not, the ROMP assembler has a bug in its
- handling of single-precision floating-point values making it impossible
- to output such values in the expected way. Therefore, it must be output
- in hex. THIS WILL NOT WORK IF CROSS-COMPILING FROM A MACHINE THAT DOES
- NOT USE IEEE-FORMAT FLOATING-POINT, but there is nothing that can be done
- about it short of fixing the assembler. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { union { int i; float f; } u_i_f; \
- u_i_f.f = (VALUE); \
- fprintf (FILE, "\t.long 0x%x\n", u_i_f.i);\
- } while (0)
-
/* This is how to output code to push a register on the stack.
It need not be very fast code. */
the loader. This depends on the AIX version. */
#define RS6000_CALL_GLUE "cror 31,31,31"
-/* This is how to output an assembler line defining a `double' constant. */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff); \
- }
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
- }
-
/* This is how to output an element of a case-vector that is relative. */
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
#define ASM_OUTPUT_LABEL(FILE, NAME) \
(assemble_name (FILE, NAME), fputs (":\n", FILE))
-/* This is how to output an assembler line defining a `double' constant. */
-
-
-/* This is how to output an assembler line defining a `double' constant. */
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
- { \
- long t[2]; \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", \
- t[0] & 0xffffffff, t[1] & 0xffffffff); \
- }
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#undef ASM_OUTPUT_FLOAT
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
- { \
- long t; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff); \
- }
-
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.
LABELNO is an integer which is different for each call. */
/* Output various types of constants. */
-/* This is how to output an assembler line defining a `double'. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((FILE), "\t.double %s\n", dstr); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((FILE), "\t.float %s\n", dstr); \
- } while (0)
-
/* Loop alignment is now done in machine_dependent_reorg, so that
branch shortening can know about it. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf ((LABEL), "*%s%ld", (PREFIX), (long)(NUM))
-/* This is how to output an assembler line defining a `float' constant.
- We always have to use a .long pseudo-op to do this because the native
- SVR4 ELF assembler is buggy and it generates incorrect values when we
- try to use the .float pseudo-op instead. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- { \
- long t; \
- char str[30]; \
- REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", \
- integer_asm_op (4, TRUE), t, \
- ASM_COMMENT_START, str); \
- } \
-
-/* This is how to output an assembler line defining a `double' constant.
- We always have to use a .long pseudo-op to do this because the native
- SVR4 ELF assembler is buggy and it generates incorrect values when we
- try to use the .float pseudo-op instead. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- { \
- long t[2]; \
- char str[30]; \
- const char *long_op = integer_asm_op (4, TRUE); \
- REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", long_op, t[0], \
- ASM_COMMENT_START, str); \
- fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[1]); \
- }
-
-/* This is how to output an assembler line defining a `long double'
- constant. */
-
-#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
- { \
- long t[4]; \
- char str[30]; \
- const char *long_op = integer_asm_op (4, TRUE); \
- REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), t); \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
- fprintf (FILE, "\t%s\t0x%lx %s ~%s\n", long_op, t[0], \
- ASM_COMMENT_START, str); \
- fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[1]); \
- fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[2]); \
- fprintf (FILE, "\t%s\t0x%lx\n", long_op, t[3]); \
- }
-
/* This is how we hook in and defer the case-vector until the end of
the function. */
#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
\f
/* Output of Data. */
-/* A C statement to output to the stdio stream STREAM an assembler instruction
- to assemble a floating-point constant of `TFmode', `DFmode', `SFmode',
- `TQFmode', `HFmode', or `QFmode', respectively, whose value is VALUE. VALUE
- will be a C expression of type `REAL_VALUE_TYPE'. Macros such as
- `REAL_VALUE_TO_TARGET_DOUBLE' are useful for writing these definitions. */
-
-/* This is how to output an assembler line defining a `double'. */
-#define ASM_OUTPUT_DOUBLE(STREAM,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((STREAM), "\t.double %s\n", dstr); \
- } while (0)
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(STREAM,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf ((STREAM), "\t.float %s\n", dstr); \
- } while (0)
-
-/* #define ASM_OUTPUT_LONG_DOUBLE(STREAM, VALUE) */
-/* #define ASM_OUTPUT_THREE_QUARTER_FLOAT(STREAM, VALUE) */
-/* #define ASM_OUTPUT_SHORT_FLOAT(STREAM, VALUE) */
-/* #define ASM_OUTPUT_BYTE_FLOAT(STREAM, VALUE) */
-
/* A C statement to output to the stdio stream STREAM an assembler instruction
to assemble a string constant containing the LEN bytes at PTR. PTR will be
a C expression of type `char *' and LEN a C expression of type `int'.
else \
goto FAIL;
-/* This is how to output an assembler line defining a `double' constant.
- It is .double or .float, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.double %s\n", dstr); \
- } while (0)
-
-
-/* This is how to output an assembler line defining a `float' constant. */
-#define ASM_OUTPUT_FLOAT(FILE, VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
- fprintf (FILE, "\t.float %s\n", dstr); \
- } while (0)
-
/* This says how to output the assembler to define a global
uninitialized but not common symbol. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
sprintf (LABEL, "*%s%d", PREFIX, NUM)
-/* This is how to output an assembler line defining a `double' constant.
- It is .dfloat or .gfloat, depending. */
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
- fprintf (FILE, "\t.%cfloat 0%c%s\n", ASM_DOUBLE_CHAR, \
- ASM_DOUBLE_CHAR, dstr); \
- } while (0);
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
- fprintf (FILE, "\t.float 0f%s\n", dstr); } while (0);
-
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */
} \
fputs ("\n", (FILE)); \
} while (0)
-
-#undef ASM_OUTPUT_DOUBLE
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { char dstr[30]; \
- REAL_VALUE_TO_DECIMAL (VALUE, "%.20e", dstr); \
- fprintf (FILE, "\t.double 0d%s\n", dstr); \
- } while (0)
ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \
} while (0)
-/* This is how to output an assembler line defining a `double' constant. */
-
-/* This is how to output an assembler line defining a `float' constant. */
-
-/* AT&T's assembler can't handle floating constants written as floating.
- However, when cross-compiling, always use that in case format differs. */
-
-#ifdef CROSS_COMPILE
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
- fprintf (FILE, "\t.double 0r%.20g\n", (VALUE))
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
- fprintf (FILE, "\t.float 0r%.10g\n", (VALUE))
-
-#else
-
-#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
-do { union { double d; long l[2];} tem; \
- tem.d = (VALUE); \
- fprintf (FILE, "\t.word 0x%lx, 0x%lx\n", tem.l[0], tem.l[1]);\
- } while (0)
-
-#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
-do { union { float f; long l;} tem; \
- tem.f = (VALUE); \
- fprintf (FILE, "\t.word 0x%lx\n", tem.l); \
- } while (0)
-
-#endif /* not CROSS_COMPILE */
-
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { \
const unsigned char *s; \
@end deftypefn
@table @code
-@findex ASM_OUTPUT_LONG_DOUBLE
-@findex ASM_OUTPUT_DOUBLE
-@findex ASM_OUTPUT_FLOAT
-@item ASM_OUTPUT_LONG_DOUBLE (@var{stream}, @var{value})
-@itemx ASM_OUTPUT_DOUBLE (@var{stream}, @var{value})
-@itemx ASM_OUTPUT_FLOAT (@var{stream}, @var{value})
-@itemx ASM_OUTPUT_THREE_QUARTER_FLOAT (@var{stream}, @var{value})
-@itemx ASM_OUTPUT_SHORT_FLOAT (@var{stream}, @var{value})
-@itemx ASM_OUTPUT_BYTE_FLOAT (@var{stream}, @var{value})
-A C statement to output to the stdio stream @var{stream} an assembler
-instruction to assemble a floating-point constant of @code{TFmode},
-@code{DFmode}, @code{SFmode}, @code{TQFmode}, @code{HFmode}, or
-@code{QFmode}, respectively, whose value is @var{value}. @var{value}
-will be a C expression of type @code{REAL_VALUE_TYPE}. Macros such as
-@code{REAL_VALUE_TO_TARGET_DOUBLE} are useful for writing these
-definitions.
-
@findex OUTPUT_ADDR_CONST_EXTRA
@item OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
A C statement to recognize @var{rtx} patterns that
static const char *strip_reg_name PARAMS ((const char *));
static int contains_pointers_p PARAMS ((tree));
-static void assemble_real_1 PARAMS ((PTR));
static void decode_addr_const PARAMS ((tree, struct addr_const *));
static int const_hash PARAMS ((tree));
static int compare_constant PARAMS ((tree,
return false;
}
\f
-/* Assemble the floating-point constant D into an object of size MODE. */
-struct assemble_real_args
-{
- REAL_VALUE_TYPE *d;
- enum machine_mode mode;
-};
-
-static void
-assemble_real_1 (p)
- PTR p;
+void
+assemble_real (d, mode, align)
+ REAL_VALUE_TYPE d;
+ enum machine_mode mode;
+ unsigned int align;
{
- struct assemble_real_args *args = (struct assemble_real_args *) p;
- REAL_VALUE_TYPE *d = args->d;
- enum machine_mode mode = args->mode;
+ long data[4];
+ long l;
+ unsigned int nalign = min_align (align, 32);
- switch (mode)
+ switch (BITS_PER_UNIT)
{
-#ifdef ASM_OUTPUT_BYTE_FLOAT
- case QFmode:
- ASM_OUTPUT_BYTE_FLOAT (asm_out_file, *d);
- break;
-#endif
-#ifdef ASM_OUTPUT_SHORT_FLOAT
- case HFmode:
- ASM_OUTPUT_SHORT_FLOAT (asm_out_file, *d);
- break;
-#endif
-#ifdef ASM_OUTPUT_THREE_QUARTER_FLOAT
- case TQFmode:
- ASM_OUTPUT_THREE_QUARTER_FLOAT (asm_out_file, *d);
- break;
-#endif
-#ifdef ASM_OUTPUT_FLOAT
- case SFmode:
- ASM_OUTPUT_FLOAT (asm_out_file, *d);
+ case 8:
+ switch (mode)
+ {
+ case SFmode:
+ REAL_VALUE_TO_TARGET_SINGLE (d, l);
+ assemble_integer (GEN_INT (l), 4, align, 1);
+ break;
+ case DFmode:
+ REAL_VALUE_TO_TARGET_DOUBLE (d, data);
+ assemble_integer (GEN_INT (data[0]), 4, align, 1);
+ assemble_integer (GEN_INT (data[1]), 4, nalign, 1);
+ break;
+ case XFmode:
+ REAL_VALUE_TO_TARGET_LONG_DOUBLE (d, data);
+ assemble_integer (GEN_INT (data[0]), 4, align, 1);
+ assemble_integer (GEN_INT (data[1]), 4, nalign, 1);
+ assemble_integer (GEN_INT (data[2]), 4, nalign, 1);
+ break;
+ case TFmode:
+ REAL_VALUE_TO_TARGET_LONG_DOUBLE (d, data);
+ assemble_integer (GEN_INT (data[0]), 4, align, 1);
+ assemble_integer (GEN_INT (data[1]), 4, nalign, 1);
+ assemble_integer (GEN_INT (data[2]), 4, nalign, 1);
+ assemble_integer (GEN_INT (data[3]), 4, nalign, 1);
+ break;
+ default:
+ abort ();
+ }
break;
-#endif
-#ifdef ASM_OUTPUT_DOUBLE
- case DFmode:
- ASM_OUTPUT_DOUBLE (asm_out_file, *d);
+ case 16:
+ switch (mode)
+ {
+ case HFmode:
+ REAL_VALUE_TO_TARGET_SINGLE (d, l);
+ assemble_integer (GEN_INT (l), 2, align, 1);
+ break;
+ case TQFmode:
+ REAL_VALUE_TO_TARGET_DOUBLE (d, data);
+ assemble_integer (GEN_INT (data[0]), 2, align, 1);
+ assemble_integer (GEN_INT (data[1]), 1, nalign, 1);
+ break;
+ default:
+ abort ();
+ }
break;
-#endif
-#ifdef ASM_OUTPUT_LONG_DOUBLE
- case XFmode:
- case TFmode:
- ASM_OUTPUT_LONG_DOUBLE (asm_out_file, *d);
+ case 32:
+ switch (mode)
+ {
+ case QFmode:
+ REAL_VALUE_TO_TARGET_SINGLE (d, l);
+ assemble_integer (GEN_INT (l), 1, align, 1);
+ break;
+ case HFmode:
+ REAL_VALUE_TO_TARGET_DOUBLE (d, data);
+ assemble_integer (GEN_INT (data[0]), 1, align, 1);
+ assemble_integer (GEN_INT (data[1]), 1, nalign, 1);
+ break;
+ default:
+ abort ();
+ }
break;
-#endif
default:
abort ();
}
}
-
-void
-assemble_real (d, mode, align)
- REAL_VALUE_TYPE d;
- enum machine_mode mode;
- unsigned int align;
-{
- struct assemble_real_args args;
- args.d = &d;
- args.mode = mode;
-
- /* We cannot emit unaligned floating point constants. This is slightly
- complicated in that we don't know what "unaligned" means exactly. */
-#ifdef BIGGEST_FIELD_ALIGNMENT
- if (align >= BIGGEST_FIELD_ALIGNMENT)
- ;
- else
-#endif
- if (align < GET_MODE_ALIGNMENT (mode))
- abort ();
-
- if (do_float_handler (assemble_real_1, (PTR) &args))
- return;
-
- internal_error ("floating point trap outputting a constant");
-}
\f
/* Here we combine duplicate floating constants to make
CONST_DOUBLE rtx's, and force those out to memory when necessary. */