]> gcc.gnu.org Git - gcc.git/blame - gcc/defaults.h
*** empty log message ***
[gcc.git] / gcc / defaults.h
CommitLineData
c53a8ab6
RS
1/* Definitions of various defaults for how to do assembler output
2 (most of which are designed to be appropriate for GAS or for
3 some BSD assembler).
4
5 Written by Ron Guilmette (rfg@ncd.com)
6
7Copyright (C) 1992 Free Software Foundation, Inc.
8
9This file is part of GNU CC.
10
11GNU CC is free software; you can redistribute it and/or modify
12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 2, or (at your option)
14any later version.
15
16GNU CC is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with GNU CC; see the file COPYING. If not, write to
23the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24
25/* choose a reasonable default for ASM_OUTPUT_ASCII. */
26
27#ifndef ASM_OUTPUT_ASCII
28#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
29 do { \
30 FILE *_hide_asm_out_file = (MYFILE); \
31 char *_hide_p = (char *) (MYSTRING); \
32 int _hide_thissize = (MYLENGTH); \
33 { \
34 FILE *asm_out_file = _hide_asm_out_file; \
35 char *p = _hide_p; \
36 int thissize = _hide_thissize; \
37 int i; \
38 fprintf (asm_out_file, "\t.ascii \""); \
39 \
40 for (i = 0; i < thissize; i++) \
41 { \
42 register int c = p[i]; \
43 if (c == '\"' || c == '\\') \
44 putc ('\\', asm_out_file); \
45 if (c >= ' ' && c < 0177) \
46 putc (c, asm_out_file); \
47 else \
48 { \
49 fprintf (asm_out_file, "\\%o", c); \
50 /* After an octal-escape, if a digit follows, \
51 terminate one string constant and start another. \
52 The Vax assembler fails to stop reading the escape \
53 after three digits, so this is the only way we \
54 can get it to parse the data properly. */ \
55 if (i < thissize - 1 \
56 && p[i + 1] >= '0' && p[i + 1] <= '9') \
57 fprintf (asm_out_file, "\"\n\t.ascii \""); \
58 } \
59 } \
60 fprintf (asm_out_file, "\"\n"); \
61 } \
62 } \
63 while (0)
64#endif
This page took 0.042713 seconds and 5 git commands to generate.