bsd.h revision 1.1 1 1.1 mrg /* Definitions for BSD assembler syntax for Intel 386
2 1.1 mrg (actually AT&T syntax for insns and operands,
3 1.1 mrg adapted to BSD conventions for symbol names and debugging.)
4 1.1 mrg Copyright (C) 1988, 1996, 2000, 2002, 2007, 2008
5 1.1 mrg Free Software Foundation, Inc.
6 1.1 mrg
7 1.1 mrg This file is part of GCC.
8 1.1 mrg
9 1.1 mrg GCC is free software; you can redistribute it and/or modify
10 1.1 mrg it under the terms of the GNU General Public License as published by
11 1.1 mrg the Free Software Foundation; either version 3, or (at your option)
12 1.1 mrg any later version.
13 1.1 mrg
14 1.1 mrg GCC is distributed in the hope that it will be useful,
15 1.1 mrg but WITHOUT ANY WARRANTY; without even the implied warranty of
16 1.1 mrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 1.1 mrg GNU General Public License for more details.
18 1.1 mrg
19 1.1 mrg You should have received a copy of the GNU General Public License
20 1.1 mrg along with GCC; see the file COPYING3. If not see
21 1.1 mrg <http://www.gnu.org/licenses/>. */
22 1.1 mrg
23 1.1 mrg /* Use the Sequent Symmetry assembler syntax. */
24 1.1 mrg
25 1.1 mrg /* Define the syntax of pseudo-ops, labels and comments. */
27 1.1 mrg
28 1.1 mrg /* Prefix for internally generated assembler labels. If we aren't using
29 1.1 mrg underscores, we are using prefix `.'s to identify labels that should
30 1.1 mrg be ignored, as in `i386/gas.h' --karl (at) cs.umb.edu */
31 1.1 mrg
32 1.1 mrg #define LPREFIX "L"
33 1.1 mrg
34 1.1 mrg /* Assembler pseudos to introduce constants of various size. */
35 1.1 mrg
36 1.1 mrg #define ASM_BYTE "\t.byte\t"
37 1.1 mrg #define ASM_SHORT "\t.word\t"
38 1.1 mrg #define ASM_LONG "\t.long\t"
39 1.1 mrg #define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
40 1.1 mrg
41 1.1 mrg /* This was suggested, but it shouldn't be right for DBX output. -- RMS
42 1.1 mrg #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
43 1.1 mrg
44 1.1 mrg
45 1.1 mrg /* Define the syntax of labels and symbol definitions/declarations. */
47 1.1 mrg
48 1.1 mrg /* This is how to output an assembler line
49 1.1 mrg that says to advance the location counter by SIZE bytes. */
50 1.1 mrg
51 1.1 mrg #define ASM_OUTPUT_SKIP(FILE,SIZE) \
52 1.1 mrg fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE))
53 1.1 mrg
54 1.1 mrg /* Define the syntax of labels and symbol definitions/declarations. */
56 1.1 mrg
57 1.1 mrg /* This says how to output an assembler line
58 1.1 mrg to define a global common symbol. */
59 1.1 mrg
60 1.1 mrg #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
61 1.1 mrg ( fputs (".comm ", (FILE)), \
62 1.1 mrg assemble_name ((FILE), (NAME)), \
63 1.1 mrg fprintf ((FILE), ",%u\n", (int)(ROUNDED)))
64 1.1 mrg
65 1.1 mrg /* This says how to output an assembler line
66 1.1 mrg to define a local common symbol. */
67 1.1 mrg
68 1.1 mrg #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
69 1.1 mrg ( fputs (".lcomm ", (FILE)), \
70 1.1 mrg assemble_name ((FILE), (NAME)), \
71 1.1 mrg fprintf ((FILE), ",%u\n", (int)(ROUNDED)))
72 1.1 mrg
73 1.1 mrg #ifdef HAVE_GAS_LCOMM_WITH_ALIGNMENT
74 1.1 mrg #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGNMENT) \
75 1.1 mrg ( fputs (".lcomm ", (FILE)), \
76 1.1 mrg assemble_name ((FILE), (NAME)), \
77 1.1 mrg fprintf ((FILE), ",%u,%u\n", (int)(SIZE), (int)(ALIGNMENT) / BITS_PER_UNIT))
78 1.1 mrg #endif
79 1.1 mrg
80 1.1 mrg /* This is how to output an assembler line
81 1.1 mrg that says to advance the location counter
82 1.1 mrg to a multiple of 2**LOG bytes. */
83 1.1 mrg
84 1.1 mrg #define ASM_OUTPUT_ALIGN(FILE,LOG) \
85 1.1 mrg if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))
86 1.1 mrg
87 1.1 mrg /* This is how to store into the string BUF
88 1.1 mrg the symbol_ref name of an internal numbered label where
89 1.1 mrg PREFIX is the class of label and NUM is the number within the class.
90 1.1 mrg This is suitable for output with `assemble_name'. */
91 1.1 mrg
92 1.1 mrg #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
93 1.1 mrg sprintf ((BUF), "*%s%ld", (PREFIX), (long)(NUMBER))
94 1.1 mrg
95 1.1 mrg /* The prefix to add to user-visible assembler symbols. */
96 1.1 mrg
97 1.1 mrg #define USER_LABEL_PREFIX "_"
98 1.1 mrg
99 1.1 mrg /* Sequent has some changes in the format of DBX symbols. */
100 1.1 mrg #define DBX_NO_XREFS 1
101
102 /* Don't split DBX symbols into continuations. */
103 #define DBX_CONTIN_LENGTH 0
104