1 /* Definitions for AT&T assembler syntax for the Intel 80386.
2 Copyright (C) 1988, 1996, 2000, 2001, 2002
3 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
23 /* Define the syntax of instructions and addresses. */
25 /* Prefix for internally generated assembler labels. */
28 /* Assembler pseudos to introduce constants of various size. */
30 #define ASM_SHORT "\t.value\t"
31 #define ASM_LONG "\t.long\t"
32 #define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
34 /* How to output an ASCII string constant. */
36 #define ASM_OUTPUT_ASCII(FILE, PTR, SIZE) \
38 { size_t i = 0, limit = (SIZE); \
40 { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n"); \
41 fputs ("\t.byte\t", (FILE)); } \
42 else fprintf ((FILE), ","); \
43 fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \
44 fprintf ((FILE), "\n"); \
47 /* Output at beginning of assembler file. */
48 /* The .file command should always begin the output. */
50 #define ASM_FILE_START(FILE) \
52 output_file_directive (FILE, main_input_filename); \
53 if (ix86_asm_dialect == ASM_INTEL) \
54 fputs ("\t.intel_syntax\n", FILE); \
57 /* Do use .optim by default on this machine. */
58 #undef ASM_FILE_START_1
59 #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n")
61 /* This is how to output an assembler line
62 that says to advance the location counter
63 to a multiple of 2**LOG bytes. */
65 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
66 if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
68 /* This is how to output an assembler line
69 that says to advance the location counter by SIZE bytes. */
71 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
72 fprintf ((FILE), "\t.set .,.+%u\n", (int)(SIZE))
74 /* Can't use ASM_OUTPUT_SKIP in text section; it doesn't leave 0s. */
76 #define ASM_NO_SKIP_IN_TEXT 1
78 /* Define the syntax of labels and symbol definitions/declarations. */
80 /* The prefix to add for compiler private assembler symbols. */
81 #undef LOCAL_LABEL_PREFIX
82 #define LOCAL_LABEL_PREFIX "."
84 /* This is how to store into the string BUF
85 the symbol_ref name of an internal numbered label where
86 PREFIX is the class of label and NUM is the number within the class.
87 This is suitable for output with `assemble_name'. */
89 #undef ASM_GENERATE_INTERNAL_LABEL
90 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
91 sprintf ((BUF), "%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUMBER))
93 /* The prefix to add to user-visible assembler symbols. */
95 #undef USER_LABEL_PREFIX
96 #define USER_LABEL_PREFIX ""