home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / config / att386.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  4KB  |  104 lines

  1. /* Definitions for AT&T assembler syntax for the Intel 80386.
  2.    Copyright (C) 1988 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  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.
  10.  
  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.
  15.  
  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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Include common aspects of all 386 Unix assemblers.  */
  21. #include "unx386.h"
  22.  
  23. #define TARGET_VERSION fprintf (stderr, " (80386, ATT syntax)");
  24.  
  25. /* Define the syntax of instructions and addresses.  */
  26.  
  27. /* Prefix for internally generated assembler labels.  */
  28. #define LPREFIX ".L"
  29.  
  30. /* Assembler pseudos to introduce constants of various size.  */
  31.  
  32. /* #define ASM_BYTE_OP "\t.byte"  Now in svr3.h or svr4.h.  */
  33. #define ASM_SHORT "\t.value"
  34. #define ASM_LONG "\t.long"
  35. #define ASM_DOUBLE "\t.double"
  36.  
  37. /* How to output an ASCII string constant.  */
  38.  
  39. #define ASM_OUTPUT_ASCII(FILE, p, size) \
  40. { int i = 0;                             \
  41.   while (i < (size))                        \
  42.     { if (i%10 == 0) { if (i!=0) fprintf ((FILE), "\n");    \
  43.                fprintf ((FILE), "%s ", ASM_BYTE_OP); }    \
  44.       else fprintf ((FILE), ",");                    \
  45.     fprintf ((FILE), "0x%x", ((p)[i++] & 0377)) ;}        \
  46.       fprintf ((FILE), "\n"); }
  47.  
  48. /* Do use .optim by default on this machine.  */
  49. #undef ASM_FILE_START_1
  50. #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.optim\n")
  51.  
  52. /* This is how to output an assembler line
  53.    that says to advance the location counter
  54.    to a multiple of 2**LOG bytes.  */
  55.  
  56. #define ASM_OUTPUT_ALIGN(FILE,LOG)    \
  57.     if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
  58.  
  59. /* This is how to output an assembler line
  60.    that says to advance the location counter by SIZE bytes.  */
  61.  
  62. #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
  63.   fprintf ((FILE), "\t.set .,.+%u\n", (SIZE))
  64.  
  65. /* Can't use ASM_OUTPUT_SKIP in text section; it doesn't leave 0s.  */
  66.  
  67. #define ASM_NO_SKIP_IN_TEXT 1
  68.  
  69. #undef BSS_SECTION_FUNCTION  /* Override the definition from svr3.h.  */
  70. #define BSS_SECTION_FUNCTION \
  71. void                                \
  72. bss_section ()                            \
  73. {                                \
  74.   if (in_section != in_bss)                    \
  75.     {                                \
  76.       fprintf (asm_out_file, "%s\n", BSS_SECTION_ASM_OP);    \
  77.       in_section = in_bss;                    \
  78.     }                                \
  79. }
  80.  
  81. /* Define the syntax of labels and symbol definitions/declarations.  */
  82.  
  83. /* This is how to store into the string BUF
  84.    the symbol_ref name of an internal numbered label where
  85.    PREFIX is the class of label and NUM is the number within the class.
  86.    This is suitable for output with `assemble_name'.  */
  87.  
  88. #undef ASM_GENERATE_INTERNAL_LABEL
  89. #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)    \
  90.   sprintf ((BUF), ".%s%d", (PREFIX), (NUMBER))
  91.  
  92. /* This is how to output an internal numbered label where
  93.    PREFIX is the class of label and NUM is the number within the class.  */
  94.  
  95. #undef ASM_OUTPUT_INTERNAL_LABEL
  96. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)    \
  97.   fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
  98.  
  99. /* This is how to output a reference to a user-level label named NAME.  */
  100.  
  101. #undef ASM_OUTPUT_LABELREF
  102. #define ASM_OUTPUT_LABELREF(FILE,NAME)    \
  103.   fprintf (FILE, "%s", NAME)
  104.