Move 'temporary' bits so they don't conflict with windows/cygwin/dgux bits
[official-gcc.git] / gcc / config / i386 / sun386.h
blob8171b8936fbdea811e54666657191be7cfe77333
1 /* Definitions for Sun assembler syntax for the Intel 80386.
2 Copyright (C) 1988, 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
22 /* Include common aspects of all 386 Unix assemblers. */
23 #include "i386/unix.h"
25 #define TARGET_VERSION fprintf (stderr, " (80386, Sun syntax)");
27 /* Define the syntax of instructions and addresses. */
29 /* Prefix for internally generated assembler labels. */
30 #define LPREFIX ".L"
32 /* Define the syntax of pseudo-ops, labels and comments. */
34 /* Assembler pseudos to introduce constants of various size. */
36 #define ASM_BYTE_OP "\t.byte"
37 #define ASM_SHORT "\t.value"
38 #define ASM_LONG "\t.long"
39 #define ASM_DOUBLE "\t.double"
41 /* How to output an ASCII string constant. */
43 #define ASM_OUTPUT_ASCII(FILE, p, size) \
44 do \
45 { int i = 0; \
46 while (i < (size)) \
47 { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \
48 fprintf ((FILE), "%s ", ASM_BYTE_OP); } \
49 else fprintf ((FILE), ","); \
50 fprintf ((FILE), "0x%x", ((p)[i++] & 0377)) ;} \
51 fprintf ((FILE), "\n"); \
52 } while (0)
54 /* Output at beginning of assembler file. */
55 /* The .file command should always begin the output. */
57 #undef ASM_FILE_START
58 #define ASM_FILE_START(FILE) \
59 do { \
60 extern char *version_string; \
61 { \
62 int len = strlen (main_input_filename); \
63 char *na = main_input_filename + len; \
64 char shorter[15]; \
65 /* NA gets MAIN_INPUT_FILENAME sans directory names. */\
66 while (na > main_input_filename) \
67 { \
68 if (na[-1] == '/') \
69 break; \
70 na--; \
71 } \
72 strncpy (shorter, na, 14); \
73 shorter[14] = 0; \
74 fprintf (FILE, "\t.file\t"); \
75 output_quoted_string (FILE, shorter); \
76 fprintf (FILE, "\n"); \
77 } \
78 fprintf (FILE, "\t.version\t\"%s %s\"\n", \
79 language_string, version_string); \
80 if (optimize) ASM_FILE_START_1 (FILE); \
81 } while (0)
83 #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n")
85 /* This is how to output an assembler line
86 that says to advance the location counter
87 to a multiple of 2**LOG bytes. */
89 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
90 if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
92 /* This is how to output an assembler line
93 that says to advance the location counter by SIZE bytes. */
95 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
96 fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE))
98 /* Output before read-only data. */
100 #undef TEXT_SECTION_ASM_OP
101 #define TEXT_SECTION_ASM_OP ".text"
103 /* Output before writable data. */
105 #undef DATA_SECTION_ASM_OP
106 #define DATA_SECTION_ASM_OP ".data"
108 /* Define the syntax of labels and symbol definitions/declarations. */
110 /* This says how to output an assembler line
111 to define a global common symbol. */
113 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
114 ( fputs (".comm ", (FILE)), \
115 assemble_name ((FILE), (NAME)), \
116 fprintf ((FILE), ",%u\n", (ROUNDED)))
118 /* This says how to output an assembler line
119 to define a local common symbol. */
121 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
122 ( fputs (".lcomm ", (FILE)), \
123 assemble_name ((FILE), (NAME)), \
124 fprintf ((FILE), ",%u\n", (ROUNDED)))
126 /* This is how to store into the string BUF
127 the symbol_ref name of an internal numbered label where
128 PREFIX is the class of label and NUM is the number within the class.
129 This is suitable for output with `assemble_name'. */
131 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
132 sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
134 /* The prefix to add to user-visible assembler symbols. */
136 #define USER_LABEL_PREFIX ""
138 /* This is how to output an internal numbered label where
139 PREFIX is the class of label and NUM is the number within the class. */
141 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
142 fprintf (FILE, ".%s%d:\n", PREFIX, NUM)