| 1 |
282 |
jeremybenn |
/* Definitions for AT&T assembler syntax for the Intel 80386.
|
| 2 |
|
|
Copyright (C) 1988, 1996, 2000, 2001, 2002, 2007, 2009
|
| 3 |
|
|
Free Software Foundation, Inc.
|
| 4 |
|
|
|
| 5 |
|
|
This file is part of GCC.
|
| 6 |
|
|
|
| 7 |
|
|
GCC 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 3, or (at your option)
|
| 10 |
|
|
any later version.
|
| 11 |
|
|
|
| 12 |
|
|
GCC 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.
|
| 16 |
|
|
|
| 17 |
|
|
Under Section 7 of GPL version 3, you are granted additional
|
| 18 |
|
|
permissions described in the GCC Runtime Library Exception, version
|
| 19 |
|
|
3.1, as published by the Free Software Foundation.
|
| 20 |
|
|
|
| 21 |
|
|
You should have received a copy of the GNU General Public License and
|
| 22 |
|
|
a copy of the GCC Runtime Library Exception along with this program;
|
| 23 |
|
|
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
| 24 |
|
|
<http://www.gnu.org/licenses/>. */
|
| 25 |
|
|
|
| 26 |
|
|
|
| 27 |
|
|
/* Define the syntax of instructions and addresses. */
|
| 28 |
|
|
|
| 29 |
|
|
/* Prefix for internally generated assembler labels. */
|
| 30 |
|
|
#define LPREFIX ".L"
|
| 31 |
|
|
|
| 32 |
|
|
/* Assembler pseudos to introduce constants of various size. */
|
| 33 |
|
|
|
| 34 |
|
|
#define ASM_BYTE "\t.byte\t"
|
| 35 |
|
|
#define ASM_SHORT "\t.value\t"
|
| 36 |
|
|
#define ASM_LONG "\t.long\t"
|
| 37 |
|
|
#define ASM_QUAD "\t.quad\t" /* Should not be used for 32bit compilation. */
|
| 38 |
|
|
|
| 39 |
|
|
/* How to output an ASCII string constant. */
|
| 40 |
|
|
|
| 41 |
|
|
#undef ASM_OUTPUT_ASCII
|
| 42 |
|
|
#define ASM_OUTPUT_ASCII(FILE, PTR, SIZE) \
|
| 43 |
|
|
do \
|
| 44 |
|
|
{ size_t i = 0, limit = (SIZE); \
|
| 45 |
|
|
while (i < limit) \
|
| 46 |
|
|
{ if (i%10 == 0) { if (i!=0) putc ('\n', (FILE)); \
|
| 47 |
|
|
fputs (ASM_BYTE, (FILE)); } \
|
| 48 |
|
|
else putc (',', (FILE)); \
|
| 49 |
|
|
fprintf ((FILE), "0x%x", ((PTR)[i++] & 0377)) ;} \
|
| 50 |
|
|
putc ('\n', (FILE)); \
|
| 51 |
|
|
} while (0)
|
| 52 |
|
|
|
| 53 |
|
|
/* Output at beginning of assembler file. */
|
| 54 |
|
|
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
|
| 55 |
|
|
|
| 56 |
|
|
/* This is how to output an assembler line
|
| 57 |
|
|
that says to advance the location counter
|
| 58 |
|
|
to a multiple of 2**LOG bytes. */
|
| 59 |
|
|
|
| 60 |
|
|
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
| 61 |
|
|
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
|
| 62 |
|
|
|
| 63 |
|
|
/* This is how to output an assembler line
|
| 64 |
|
|
that says to advance the location counter by SIZE bytes. */
|
| 65 |
|
|
|
| 66 |
|
|
#undef ASM_OUTPUT_SKIP
|
| 67 |
|
|
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
| 68 |
|
|
fprintf ((FILE), "\t.set .,.+%u\n", (int)(SIZE))
|
| 69 |
|
|
|
| 70 |
|
|
/* Can't use ASM_OUTPUT_SKIP in text section; it doesn't leave 0s. */
|
| 71 |
|
|
|
| 72 |
|
|
#define ASM_NO_SKIP_IN_TEXT 1
|
| 73 |
|
|
|
| 74 |
|
|
/* Define the syntax of labels and symbol definitions/declarations. */
|
| 75 |
|
|
|
| 76 |
|
|
/* The prefix to add for compiler private assembler symbols. */
|
| 77 |
|
|
#undef LOCAL_LABEL_PREFIX
|
| 78 |
|
|
#define LOCAL_LABEL_PREFIX "."
|
| 79 |
|
|
|
| 80 |
|
|
/* This is how to store into the string BUF
|
| 81 |
|
|
the symbol_ref name of an internal numbered label where
|
| 82 |
|
|
PREFIX is the class of label and NUM is the number within the class.
|
| 83 |
|
|
This is suitable for output with `assemble_name'. */
|
| 84 |
|
|
|
| 85 |
|
|
#undef ASM_GENERATE_INTERNAL_LABEL
|
| 86 |
|
|
#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
|
| 87 |
|
|
sprintf ((BUF), LOCAL_LABEL_PREFIX "%s%ld", (PREFIX), (long)(NUMBER))
|
| 88 |
|
|
|
| 89 |
|
|
/* The prefix to add to user-visible assembler symbols. */
|
| 90 |
|
|
|
| 91 |
|
|
#undef USER_LABEL_PREFIX
|
| 92 |
|
|
#define USER_LABEL_PREFIX ""
|