diff options
Diffstat (limited to 'gcc/config/mips/mips.c')
-rw-r--r-- | gcc/config/mips/mips.c | 56 |
1 files changed, 10 insertions, 46 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index b295ffcb8e1..acd6ae0a704 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -5135,56 +5135,20 @@ mips_output_ascii (FILE *stream, const char *string_param, size_t len, { register int c = string[i]; - switch (c) + if (ISPRINT (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) + if (c == '\\' || c == '\"') { - putc (c, stream); + putc ('\\', stream); cur_pos++; } - else - { - fprintf (stream, "\\%03o", c); - cur_pos += 4; - } + putc (c, stream); + cur_pos++; + } + else + { + fprintf (stream, "\\%03o", c); + cur_pos += 4; } if (cur_pos > 72 && i+1 < len) |