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 / seq386.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  4KB  |  127 lines

  1. /* Definitions for Sequent Intel 386.
  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 "i386.h"
  21.  
  22. /* Use the BSD assembler syntax.  */
  23.  
  24. #include "bsd386.h"
  25.  
  26. /* By default, don't use IEEE compatible arithmetic comparisons
  27.    because the assembler can't handle the fucom insn.
  28.    Return float values in the 387.
  29.    (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387) */
  30.  
  31. #undef TARGET_DEFAULT
  32. #define TARGET_DEFAULT 0201
  33.  
  34. /* Specify predefined symbols in preprocessor.  */
  35.  
  36. #define CPP_PREDEFINES "-Dunix -Di386 -Dsequent"
  37.  
  38. /* Pass -Z and -ZO options to the linker.  */
  39.  
  40. #define LINK_SPEC "%{Z*}"
  41.  
  42. /* Link with libg.a when debugging, for dbx's sake.  */
  43.  
  44. #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
  45.  
  46. /* We don't want to output SDB debugging information.  */
  47.  
  48. #undef SDB_DEBUGGING_INFO
  49.  
  50. /* We want to output DBX debugging information.  */
  51.  
  52. #define DBX_DEBUGGING_INFO
  53.  
  54. /* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */
  55. #define SIZE_TYPE "int"
  56.  
  57. /* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st.
  58.  * dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3),
  59.  *         st(4), st(5), st(6), st(7), sp, bp  */
  60.  
  61. /* ??? The right thing would be to change the ordering of the
  62.    registers to correspond to the conventions of this system,
  63.    and get rid of DBX_REGISTER_NUMBER.  */
  64.  
  65. #undef DBX_REGISTER_NUMBER
  66. #define DBX_REGISTER_NUMBER(n)        \
  67. ((n) < 3 ? (n) : (n) < 6 ? (n) + 2    \
  68.  : (n) == 6 ? 15 : (n) == 7 ? 14 : 3)
  69.  
  70. /* Prevent anything from being allocated in the register pair cx/bx,
  71.    since that would confuse GDB.  */
  72.  
  73. #undef HARD_REGNO_MODE_OK
  74. #define HARD_REGNO_MODE_OK(REGNO, MODE) \
  75.   (((REGNO) < 2 ? 1                            \
  76.     : (REGNO) < 4 ? 1                            \
  77.     : (REGNO) >= 8 ? (GET_MODE_CLASS (MODE) == MODE_FLOAT        \
  78.             || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)    \
  79.     : (MODE) != QImode)                            \
  80.    && ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4))
  81.  
  82. /* Output assembler code to FILE to increment profiler label # LABELNO
  83.    for profiling a function entry. */
  84.  
  85. #undef FUNCTION_PROFILER
  86. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  87.    fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO));
  88.  
  89. /* Assembler pseudo-op for shared data segment. */
  90. #define SHARED_SECTION_ASM_OP ".shdata"
  91.  
  92. /* A C statement or statements which output an assembler instruction
  93.    opcode to the stdio stream STREAM.  The macro-operand PTR is a
  94.    variable of type `char *' which points to the opcode name in its
  95.    "internal" form--the form that is written in the machine description.
  96.  
  97.    The Sequent assembler (identified as "Balance 8000 Assembler
  98.    07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string
  99.    move mnemonics - it uses `smov[bwl]' instead.  Change "movs" into
  100.    "smov", carefully avoiding the sign-extend opcodes.  */
  101.  
  102. #define ASM_OUTPUT_OPCODE(STREAM, PTR)    \
  103. {                                    \
  104.   if ((PTR)[0] == 'm'                            \
  105.       && (PTR)[1] == 'o'                        \
  106.       && (PTR)[2] == 'v'                        \
  107.       && (PTR)[3] == 's'                        \
  108.       && ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l')    \
  109.       && ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0'))    \
  110.     {                                    \
  111.       fprintf (STREAM, "smov");                        \
  112.       (PTR) += 4;                            \
  113.     }                                    \
  114. }
  115.  
  116. /* 10-Aug-92 pes  Local labels are prefixed with ".L" */
  117. #undef LPREFIX
  118. #define LPREFIX ".L"
  119.  
  120. #undef ASM_GENERATE_INTERNAL_LABEL
  121. #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\
  122.   sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
  123.  
  124. #undef ASM_OUTPUT_INTERNAL_LABEL
  125. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
  126.   fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
  127.