|
|
1.1 root 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 Free Software Foundation, Inc.
5:
6: This file is part of GNU CC.
7:
8: GNU CC is free software; you can redistribute it and/or modify
9: it under the terms of the GNU General Public License as published by
10: the Free Software Foundation; either version 2, or (at your option)
11: any later version.
12:
13: GNU CC is distributed in the hope that it will be useful,
14: but WITHOUT ANY WARRANTY; without even the implied warranty of
15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: GNU General Public License for more details.
17:
18: You should have received a copy of the GNU General Public License
19: along with GNU CC; see the file COPYING. If not, write to
1.1.1.3 ! root 20: the Free Software Foundation, 59 Temple Place - Suite 330,
! 21: Boston, MA 02111-1307, USA. */
1.1 root 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' [email protected] */
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_BYTE_OP "\t.byte"
44: #define ASM_SHORT "\t.word"
45: #define ASM_LONG "\t.long"
46: #define ASM_DOUBLE "\t.double"
47:
48: /* Output at beginning of assembler file.
49: ??? I am skeptical of this -- RMS. */
50:
51: #define ASM_FILE_START(FILE) \
1.1.1.2 root 52: do { fprintf (FILE, "\t.file\t"); \
53: output_quoted_string (FILE, dump_base_name); \
54: fprintf (FILE, "\n"); \
55: } while (0)
1.1 root 56:
57: /* This was suggested, but it shouldn't be right for DBX output. -- RMS
58: #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
59:
60:
61: /* Define the syntax of labels and symbol definitions/declarations. */
62:
63: /* This is how to output an assembler line
64: that says to advance the location counter by SIZE bytes. */
65:
66: #define ASM_OUTPUT_SKIP(FILE,SIZE) \
67: fprintf (FILE, "\t.space %u\n", (SIZE))
68:
69: /* Define the syntax of labels and symbol definitions/declarations. */
70:
71: /* This says how to output an assembler line
72: to define a global common symbol. */
73:
74: #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
75: ( fputs (".comm ", (FILE)), \
76: assemble_name ((FILE), (NAME)), \
77: fprintf ((FILE), ",%u\n", (ROUNDED)))
78:
79: /* This says how to output an assembler line
80: to define a local common symbol. */
81:
82: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
83: ( fputs (".lcomm ", (FILE)), \
84: assemble_name ((FILE), (NAME)), \
85: fprintf ((FILE), ",%u\n", (ROUNDED)))
86:
87: /* This is how to output an assembler line
88: that says to advance the location counter
89: to a multiple of 2**LOG bytes. */
90:
91: #define ASM_OUTPUT_ALIGN(FILE,LOG) \
92: if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))
93:
94: /* This is how to store into the string BUF
95: the symbol_ref name of an internal numbered label where
96: PREFIX is the class of label and NUM is the number within the class.
97: This is suitable for output with `assemble_name'. */
98:
99: #ifdef NO_UNDERSCORES
100: #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
101: sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
102: #else
103: #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
104: sprintf ((BUF), "*%s%d", (PREFIX), (NUMBER))
105: #endif
106:
107: /* This is how to output an internal numbered label where
108: PREFIX is the class of label and NUM is the number within the class. */
109:
110: #ifdef NO_UNDERSCORES
111: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
112: fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
113: #else
114: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
115: fprintf (FILE, "%s%d:\n", PREFIX, NUM)
116: #endif
117:
118: /* This is how to output a reference to a user-level label named NAME. */
119:
120: #ifdef NO_UNDERSCORES
121: #define ASM_OUTPUT_LABELREF(FILE,NAME) fprintf (FILE, "%s", NAME)
122: #else
123: #define ASM_OUTPUT_LABELREF(FILE,NAME) fprintf (FILE, "_%s", NAME)
124: #endif /* not NO_UNDERSCORES */
125:
126: /* Sequent has some changes in the format of DBX symbols. */
127: #define DBX_NO_XREFS 1
128:
129: /* Don't split DBX symbols into continuations. */
130: #define DBX_CONTIN_LENGTH 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.