diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-08-14 16:09:34 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-08-14 16:09:34 -0700 |
commit | 1827f5ca56cb87e6ce9cef89d024896743c44faa (patch) | |
tree | a91d0cb0a4202d250890a7591e60777cde1204b5 | |
parent | 67c87d4287aa991d34ed1393416d0a9a63275079 (diff) | |
download | gcc-1827f5ca56cb87e6ce9cef89d024896743c44faa.zip gcc-1827f5ca56cb87e6ce9cef89d024896743c44faa.tar.gz gcc-1827f5ca56cb87e6ce9cef89d024896743c44faa.tar.bz2 |
(ASM_OUTPUT_NEWLINE): Delete.
(ASM_OUTPUT_ASCII): Define.
From-SVN: r7923
-rw-r--r-- | gcc/config/mips/bsd-5.h | 21 | ||||
-rw-r--r-- | gcc/config/mips/mips-5.h | 21 | ||||
-rw-r--r-- | gcc/config/mips/svr3-5.h | 21 | ||||
-rw-r--r-- | gcc/config/mips/svr4-5.h | 21 |
4 files changed, 64 insertions, 20 deletions
diff --git a/gcc/config/mips/bsd-5.h b/gcc/config/mips/bsd-5.h index bc26533..eb71514 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 3c8ce39..252becf 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 2a2028c..5e7e111 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 e13cb86..5c134c8 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) |