aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoff Keating <geoffk@cygnus.com>2001-05-31 19:39:30 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2001-05-31 19:39:30 +0000
commitb3276c7a5dfe301dff29109bd96cb159a7651c24 (patch)
tree7b7f378cb9237c9235418b277d89410851f5128b /gcc
parentd29087b4311840a5834218400e8870a16b93b488 (diff)
downloadgcc-b3276c7a5dfe301dff29109bd96cb159a7651c24.zip
gcc-b3276c7a5dfe301dff29109bd96cb159a7651c24.tar.gz
gcc-b3276c7a5dfe301dff29109bd96cb159a7651c24.tar.bz2
mips.h (ASM_OUTPUT_ASCII): Convert to function.
* config/mips/mips.h (ASM_OUTPUT_ASCII): Convert to function. * config/mips/mips.c (mips_output_ascii): New function. * config/mips/mips-protos.h (mips_output_ascii): Prototype. * config/mips/mips.h (DWARF_CIE_DATA_ALIGNMENT): Force to 4. From-SVN: r42753
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/mips/mips-protos.h1
-rw-r--r--gcc/config/mips/mips.c79
-rw-r--r--gcc/config/mips/mips.h75
4 files changed, 94 insertions, 69 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e568026..ff8afc9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-31 Geoff Keating <geoffk@cygnus.com>
+
+ * config/mips/mips.h (ASM_OUTPUT_ASCII): Convert to function.
+ * config/mips/mips.c (mips_output_ascii): New function.
+ * config/mips/mips-protos.h (mips_output_ascii): Prototype.
+
+ * config/mips/mips.h (DWARF_CIE_DATA_ALIGNMENT): Force to 4.
+
Thu May 31 19:09:53 CEST 2001 Jan Hubicka <jh@suse.cz>
* flow.c (set_block_for_new_insns): Remove bogus shortcut.
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 2cc8166..81e15a1 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -41,6 +41,7 @@ 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 *, size_t));
extern void mips_order_regs_for_local_alloc PARAMS ((void));
extern struct rtx_def * mips16_gp_pseudo_reg PARAMS ((void));
#ifdef ASM_OUTPUT_UNDEF_FUNCTION
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index c90857e..05edaff8 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5882,6 +5882,85 @@ mips_output_lineno (stream, line)
}
}
+/* Output an ASCII string, in a space-saving way. */
+
+void
+mips_output_ascii (stream, string_param, len)
+ FILE *stream;
+ const char *string_param;
+ size_t len;
+{
+ size_t i;
+ int cur_pos = 17;
+ register const unsigned char *string =
+ (const unsigned char *)string_param;
+
+ fprintf (stream, "\t.ascii\t\"");
+ for (i = 0; i < len; i++)
+ {
+ register int c = string[i];
+
+ switch (c)
+ {
+ case '\"':
+ case '\\':
+ putc ('\\', stream);
+ putc (c, stream);
+ cur_pos += 2;
+ break;
+
+ case TARGET_NEWLINE:
+ fputs ("\\n", stream);
+ if (i+1 < len
+ && (((c = string[i+1]) >= '\040' && c <= '~')
+ || c == TARGET_TAB))
+ cur_pos = 32767; /* break right here */
+ else
+ cur_pos += 2;
+ break;
+
+ case TARGET_TAB:
+ fputs ("\\t", stream);
+ cur_pos += 2;
+ break;
+
+ case TARGET_FF:
+ fputs ("\\f", stream);
+ cur_pos += 2;
+ break;
+
+ case TARGET_BS:
+ fputs ("\\b", stream);
+ cur_pos += 2;
+ break;
+
+ case TARGET_CR:
+ fputs ("\\r", stream);
+ cur_pos += 2;
+ break;
+
+ default:
+ if (c >= ' ' && c < 0177)
+ {
+ putc (c, stream);
+ cur_pos++;
+ }
+ else
+ {
+ fprintf (stream, "\\%03o", c);
+ cur_pos += 4;
+ }
+ }
+
+ if (cur_pos > 72 && i+1 < len)
+ {
+ cur_pos = 17;
+ fprintf (stream, "\"\n\t.ascii\t\"");
+ }
+ }
+ fprintf (stream, "\"\n");
+}
+
/* If defined, a C statement to be executed just prior to the output of
assembler code for INSN, to modify the extracted operands so they will be
output differently.
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 3d3ea80..77bc6fd 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1109,6 +1109,11 @@ while (0)
#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + GP_ARG_FIRST : INVALID_REGNUM)
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, GP_REG_FIRST + 3)
+/* Offsets recorded in opcodes are a multiple of this alignment factor.
+ The default for this in 64-bit mode is 8, which causes problems with
+ SFmode register saves. */
+#define DWARF_CIE_DATA_ALIGNMENT 4
+
/* Overrides for the COFF debug format. */
#define PUT_SDB_SCL(a) \
do { \
@@ -4392,75 +4397,7 @@ do { \
/* This is how to output a string. */
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \
-do { \
- register int i, c, len = (LEN), cur_pos = 17; \
- register const unsigned char *string = \
- (const unsigned char *)(STRING); \
- fprintf ((STREAM), "\t.ascii\t\""); \
- for (i = 0; i < len; i++) \
- { \
- register int c = string[i]; \
- \
- switch (c) \
- { \
- case '\"': \
- case '\\': \
- putc ('\\', (STREAM)); \
- putc (c, (STREAM)); \
- cur_pos += 2; \
- break; \
- \
- case TARGET_NEWLINE: \
- fputs ("\\n", (STREAM)); \
- if (i+1 < len \
- && (((c = string[i+1]) >= '\040' && c <= '~') \
- || c == TARGET_TAB)) \
- cur_pos = 32767; /* break right here */ \
- else \
- cur_pos += 2; \
- break; \
- \
- case TARGET_TAB: \
- fputs ("\\t", (STREAM)); \
- cur_pos += 2; \
- break; \
- \
- case TARGET_FF: \
- fputs ("\\f", (STREAM)); \
- cur_pos += 2; \
- break; \
- \
- case TARGET_BS: \
- fputs ("\\b", (STREAM)); \
- cur_pos += 2; \
- break; \
- \
- case TARGET_CR: \
- fputs ("\\r", (STREAM)); \
- cur_pos += 2; \
- break; \
- \
- default: \
- if (c >= ' ' && c < 0177) \
- { \
- putc (c, (STREAM)); \
- cur_pos++; \
- } \
- else \
- { \
- fprintf ((STREAM), "\\%03o", c); \
- cur_pos += 4; \
- } \
- } \
- \
- if (cur_pos > 72 && i+1 < len) \
- { \
- cur_pos = 17; \
- fprintf ((STREAM), "\"\n\t.ascii\t\""); \
- } \
- } \
- fprintf ((STREAM), "\"\n"); \
-} while (0)
+ mips_output_ascii (STREAM, STRING, LEN)
/* Handle certain cpp directives used in header files on sysV. */
#define SCCS_DIRECTIVE