aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-07-27 14:38:28 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-07-27 14:38:28 -0700
commit303d524aef31bd7aecdcded2615c6459881a4c6c (patch)
treed25f2edcb0a97b302204ce5d09abd407911a267b
parentc2fb4581c8df828370c92a5beefc384931c61f63 (diff)
downloadgcc-303d524aef31bd7aecdcded2615c6459881a4c6c.zip
gcc-303d524aef31bd7aecdcded2615c6459881a4c6c.tar.gz
gcc-303d524aef31bd7aecdcded2615c6459881a4c6c.tar.bz2
(ASM_LONG, ASM_SHORT, ASM_BYTE_OP): Definitions added.
(ASM_OUTPUT_DOUBLE): Use REAL_VALUE_TO_TARGET_DOUBLE to convert. (ASM_OUTPUT_FLOAT): Use REAL_VALUE_TO_TARGET_SINGLE to convert. (ASM_OUTPUT_INT): Use ASM_LONG pseudo-op. (ASM_OUTPUT_SHORT): Use ASM_SHORT pseudo-op. (ASM_OUTPUT_CHAR): Use ASM_BYTE_OP pseudo-op. (ASM_OUTPUT_BYTE): Use ASM_BYTE_OP pseudo-op. From-SVN: r1692
-rw-r--r--gcc/config/sparc/sparc.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index b4f5f69..2cb0c0e 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1439,6 +1439,10 @@ extern struct rtx_def *legitimize_pic_address ();
#define ASM_APP_OFF ""
+#define ASM_LONG ".word"
+#define ASM_SHORT ".half"
+#define ASM_BYTE_OP ".byte"
+
/* Output before read-only data. */
#define TEXT_SECTION_ASM_OP ".text"
@@ -1536,14 +1540,14 @@ extern struct rtx_def *legitimize_pic_address ();
They reject 99e9999, but accept inf. */
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
{ \
- if (REAL_VALUE_ISINF (VALUE)) \
- fprintf (FILE, "\t.double 0r%sinf\n", (VALUE) > 0 ? "" : "-"); \
- else if (REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
+ if (REAL_VALUE_ISINF (VALUE) \
+ || REAL_VALUE_ISNAN (VALUE) \
+ || REAL_VALUE_MINUS_ZERO (VALUE)) \
{ \
- union { double d; long l[2];} t; \
- t.d = (VALUE); \
- fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", t.l[0], t.l[1]); \
+ long t[2]; \
+ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
+ fprintf (FILE, "\t%s\t0x%lx\n\t%s\t0x%lx\n", \
+ ASM_LONG, t[0], ASM_LONG, t[1]); \
} \
else \
fprintf (FILE, "\t.double 0r%.17g\n", VALUE); \
@@ -1553,14 +1557,13 @@ extern struct rtx_def *legitimize_pic_address ();
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
{ \
- if (REAL_VALUE_ISINF (VALUE)) \
- fprintf (FILE, "\t.single 0r%sinf\n", (VALUE) > 0 ? "" : "-"); \
- else if (REAL_VALUE_ISNAN (VALUE) \
- || REAL_VALUE_MINUS_ZERO (VALUE)) \
+ if (REAL_VALUE_ISINF (VALUE) \
+ || REAL_VALUE_ISNAN (VALUE) \
+ || REAL_VALUE_MINUS_ZERO (VALUE)) \
{ \
- union { float f; long l;} t; \
- t.f = (VALUE); \
- fprintf (FILE, "\t.word 0x%lx\n", t.l); \
+ long t; \
+ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
+ fprintf (FILE, "\t%s\t0x%lx\n", ASM_LONG, t); \
} \
else \
fprintf (FILE, "\t.single 0r%.9g\n", VALUE); \
@@ -1569,7 +1572,7 @@ extern struct rtx_def *legitimize_pic_address ();
/* This is how to output an assembler line defining an `int' constant. */
#define ASM_OUTPUT_INT(FILE,VALUE) \
-( fprintf (FILE, "\t.word "), \
+( fprintf (FILE, "\t%s\t", ASM_LONG), \
output_addr_const (FILE, (VALUE)), \
fprintf (FILE, "\n"))
@@ -1580,19 +1583,19 @@ extern struct rtx_def *legitimize_pic_address ();
/* Likewise for `char' and `short' constants. */
#define ASM_OUTPUT_SHORT(FILE,VALUE) \
-( fprintf (FILE, "\t.half "), \
+( fprintf (FILE, "\t%s\t", ASM_SHORT), \
output_addr_const (FILE, (VALUE)), \
fprintf (FILE, "\n"))
#define ASM_OUTPUT_CHAR(FILE,VALUE) \
-( fprintf (FILE, "\t.byte "), \
+( fprintf (FILE, "\t%s\t", ASM_BYTE_OP), \
output_addr_const (FILE, (VALUE)), \
fprintf (FILE, "\n"))
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE,VALUE) \
- fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
+ fprintf (FILE, "\t%s\t0x%x\n", ASM_BYTE_OP, (VALUE))
/* This is how to output an element of a case-vector that is absolute. */