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
This commit is contained in:
Geoff Keating 2001-05-31 19:39:30 +00:00 committed by Geoffrey Keating
parent d29087b431
commit b3276c7a5d
4 changed files with 94 additions and 69 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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