From: Jim Wilson Date: Sun, 14 Aug 1994 23:09:34 +0000 (-0700) Subject: (ASM_OUTPUT_NEWLINE): Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1827f5ca56cb87e6ce9cef89d024896743c44faa;p=gcc.git (ASM_OUTPUT_NEWLINE): Delete. (ASM_OUTPUT_ASCII): Define. From-SVN: r7923 --- diff --git a/gcc/config/mips/bsd-5.h b/gcc/config/mips/bsd-5.h index bc26533d658..eb715146a40 100644 --- a/gcc/config/mips/bsd-5.h +++ b/gcc/config/mips/bsd-5.h @@ -46,9 +46,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define MD_STARTFILE_PREFIX "/bsd43/usr/lib/cmplrs/cc/" #define MD_EXEC_PREFIX "/bsd43/usr/lib/cmplrs/cc/" -/* Some RISCOS assemblers misassemble \n in a .ascii, - so we use \X0A instead. */ -#define ASM_OUTPUT_NEWLINE(STREAM) \ - fputs ("\\X0A", (STREAM)); - #include "mips/mips.h" + +/* Some assemblers have a bug that causes backslash escaped chars in .ascii + to be misassembled, so we just completely avoid it. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ +do { \ + unsigned char *s; \ + int i; \ + for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++) \ + { \ + if ((i % 8) == 0) \ + fputs ("\n\t.byte\t", (FILE)); \ + fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ + } \ + fputs ("\n", (FILE)); \ +} while (0) diff --git a/gcc/config/mips/mips-5.h b/gcc/config/mips/mips-5.h index 3c8ce39fe93..252becfa719 100644 --- a/gcc/config/mips/mips-5.h +++ b/gcc/config/mips/mips-5.h @@ -26,9 +26,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s crtn.o%s}}" -/* Some RISCOS assemblers misassemble \n in a .ascii, - so we use \X0A instead. */ -#define ASM_OUTPUT_NEWLINE(STREAM) \ - fputs ("\\X0A", (STREAM)); - #include "mips/mips.h" + +/* Some assemblers have a bug that causes backslash escaped chars in .ascii + to be misassembled, so we just completely avoid it. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ +do { \ + unsigned char *s; \ + int i; \ + for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++) \ + { \ + if ((i % 8) == 0) \ + fputs ("\n\t.byte\t", (FILE)); \ + fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ + } \ + fputs ("\n", (FILE)); \ +} while (0) diff --git a/gcc/config/mips/svr3-5.h b/gcc/config/mips/svr3-5.h index 2a2028c713e..5e7e111cb5a 100644 --- a/gcc/config/mips/svr3-5.h +++ b/gcc/config/mips/svr3-5.h @@ -68,9 +68,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Generate calls to memcpy, etc., not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS -/* Some RISCOS assemblers misassemble \n in a .ascii, - so we use \X0A instead. */ -#define ASM_OUTPUT_NEWLINE(STREAM) \ - fputs ("\\X0A", (STREAM)); - #include "mips/mips.h" + +/* Some assemblers have a bug that causes backslash escaped chars in .ascii + to be misassembled, so we just completely avoid it. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ +do { \ + unsigned char *s; \ + int i; \ + for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++) \ + { \ + if ((i % 8) == 0) \ + fputs ("\n\t.byte\t", (FILE)); \ + fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ + } \ + fputs ("\n", (FILE)); \ +} while (0) diff --git a/gcc/config/mips/svr4-5.h b/gcc/config/mips/svr4-5.h index e13cb86fd5e..5c134c85380 100644 --- a/gcc/config/mips/svr4-5.h +++ b/gcc/config/mips/svr4-5.h @@ -71,9 +71,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Generate calls to memcpy, etc., not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS -/* Some RISCOS assemblers misassemble \n in a .ascii, - so we use \X0A instead. */ -#define ASM_OUTPUT_NEWLINE(STREAM) \ - fputs ("\\X0A", (STREAM)); - #include "mips/mips.h" + +/* Some assemblers have a bug that causes backslash escaped chars in .ascii + to be misassembled, so we just completely avoid it. */ +#undef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ +do { \ + unsigned char *s; \ + int i; \ + for (i = 0, s = (unsigned char *)(PTR); i < (LEN); s++, i++) \ + { \ + if ((i % 8) == 0) \ + fputs ("\n\t.byte\t", (FILE)); \ + fprintf ((FILE), "%s0x%x", (i%8?",":""), (unsigned)*s); \ + } \ + fputs ("\n", (FILE)); \ +} while (0)