bsd.h revision 90075
1/* Definitions for BSD assembler syntax for Intel 386
2   (actually AT&T syntax for insns and operands,
3   adapted to BSD conventions for symbol names and debugging.)
4   Copyright (C) 1988, 1996, 2000 Free Software Foundation, Inc.
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING.  If not, write to
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA.  */
22
23/* Include common aspects of all 386 Unix assemblers.  */
24#include "i386/unix.h"
25
26/* Use the Sequent Symmetry assembler syntax.  */
27
28#define TARGET_VERSION fprintf (stderr, " (80386, BSD syntax)");
29
30/* Define the syntax of pseudo-ops, labels and comments.  */
31
32/* Prefix for internally generated assembler labels.  If we aren't using
33   underscores, we are using prefix `.'s to identify labels that should
34   be ignored, as in `i386/gas.h' --karl@cs.umb.edu  */
35#ifdef NO_UNDERSCORES
36#define LPREFIX ".L"
37#else
38#define LPREFIX "L"
39#endif /* not NO_UNDERSCORES */
40
41/* Assembler pseudos to introduce constants of various size.  */
42
43#define ASM_SHORT "\t.word\t"
44#define ASM_LONG "\t.long\t"
45#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
46
47/* Output at beginning of assembler file.
48   ??? I am skeptical of this -- RMS.  */
49
50#define ASM_FILE_START(FILE) \
51  do {	output_file_directive (FILE, main_input_filename);	\
52  } while (0)
53
54/* This was suggested, but it shouldn't be right for DBX output. -- RMS
55   #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
56
57
58/* Define the syntax of labels and symbol definitions/declarations.  */
59
60/* This is how to output an assembler line
61   that says to advance the location counter by SIZE bytes.  */
62
63#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
64  fprintf (FILE, "\t.space %u\n", (SIZE))
65
66/* Define the syntax of labels and symbol definitions/declarations.  */
67
68/* This says how to output an assembler line
69   to define a global common symbol.  */
70
71#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
72( fputs (".comm ", (FILE)),			\
73  assemble_name ((FILE), (NAME)),		\
74  fprintf ((FILE), ",%u\n", (ROUNDED)))
75
76/* This says how to output an assembler line
77   to define a local common symbol.  */
78
79#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
80( fputs (".lcomm ", (FILE)),			\
81  assemble_name ((FILE), (NAME)),		\
82  fprintf ((FILE), ",%u\n", (ROUNDED)))
83
84/* This is how to output an assembler line
85   that says to advance the location counter
86   to a multiple of 2**LOG bytes.  */
87
88#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
89  if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))
90
91/* This is how to store into the string BUF
92   the symbol_ref name of an internal numbered label where
93   PREFIX is the class of label and NUM is the number within the class.
94   This is suitable for output with `assemble_name'.  */
95
96#ifdef NO_UNDERSCORES
97#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)	\
98    sprintf ((BUF), "*.%s%ld", (PREFIX), (long)(NUMBER))
99#else
100#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)	\
101    sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER))
102#endif
103
104/* This is how to output an internal numbered label where
105   PREFIX is the class of label and NUM is the number within the class.  */
106
107#ifdef NO_UNDERSCORES
108#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
109  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
110#else
111#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
112  fprintf (FILE, "%s%d:\n", PREFIX, NUM)
113#endif
114
115/* The prefix to add to user-visible assembler symbols.  */
116
117#ifdef NO_UNDERSCORES
118#define USER_LABEL_PREFIX ""
119#else
120#define USER_LABEL_PREFIX "_"
121#endif /* not NO_UNDERSCORES */
122
123/* Sequent has some changes in the format of DBX symbols.  */
124#define DBX_NO_XREFS 1
125
126/* Don't split DBX symbols into continuations.  */
127#define DBX_CONTIN_LENGTH 0
128