diff options
author | Richard Stallman <rms@gnu.org> | 1992-04-25 01:51:02 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-04-25 01:51:02 +0000 |
commit | c53a8ab63a01bb24b6139345144f93a8abd5b05b (patch) | |
tree | 7169d6ccc3c3a1959d23fd763ad2b9236748a5ec /gcc | |
parent | 9c0022f6602e3c9d577466ffee468d67b69aa94e (diff) | |
download | gcc-c53a8ab63a01bb24b6139345144f93a8abd5b05b.zip gcc-c53a8ab63a01bb24b6139345144f93a8abd5b05b.tar.gz gcc-c53a8ab63a01bb24b6139345144f93a8abd5b05b.tar.bz2 |
Initial revision
From-SVN: r831
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/defaults.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h new file mode 100644 index 0000000..f53d540 --- /dev/null +++ b/gcc/defaults.h @@ -0,0 +1,64 @@ +/* Definitions of various defaults for how to do assembler output + (most of which are designed to be appropriate for GAS or for + some BSD assembler). + + Written by Ron Guilmette (rfg@ncd.com) + +Copyright (C) 1992 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* choose a reasonable default for ASM_OUTPUT_ASCII. */ + +#ifndef ASM_OUTPUT_ASCII +#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ + do { \ + FILE *_hide_asm_out_file = (MYFILE); \ + char *_hide_p = (char *) (MYSTRING); \ + int _hide_thissize = (MYLENGTH); \ + { \ + FILE *asm_out_file = _hide_asm_out_file; \ + char *p = _hide_p; \ + int thissize = _hide_thissize; \ + int i; \ + fprintf (asm_out_file, "\t.ascii \""); \ + \ + for (i = 0; i < thissize; i++) \ + { \ + register int c = p[i]; \ + if (c == '\"' || c == '\\') \ + putc ('\\', asm_out_file); \ + if (c >= ' ' && c < 0177) \ + putc (c, asm_out_file); \ + else \ + { \ + fprintf (asm_out_file, "\\%o", c); \ + /* After an octal-escape, if a digit follows, \ + terminate one string constant and start another. \ + The Vax assembler fails to stop reading the escape \ + after three digits, so this is the only way we \ + can get it to parse the data properly. */ \ + if (i < thissize - 1 \ + && p[i + 1] >= '0' && p[i + 1] <= '9') \ + fprintf (asm_out_file, "\"\n\t.ascii \""); \ + } \ + } \ + fprintf (asm_out_file, "\"\n"); \ + } \ + } \ + while (0) +#endif |