home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / gcc-2.6.0-src.lha / GNU / src / amiga / gcc-2.6.0 / config / i386 / netbsd-i386.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-14  |  4.9 KB  |  156 lines

  1. /* This goes away when the math-emulator is fixed */
  2. #define TARGET_CPU_DEFAULT 0400        /* TARGET_NO_FANCY_MATH_387 */
  3.  
  4. /* This is tested by i386gas.h.  */
  5. #define YES_UNDERSCORES
  6.  
  7. #include "i386/gstabs.h"
  8.  
  9. /* Get perform_* macros to build libgcc.a.  */
  10. #include "i386/perform.h"
  11.  
  12. /* Get generic NetBSD definitions.  */
  13. #include "netbsd.h"
  14.  
  15. #undef CPP_PREDEFINES
  16. #define CPP_PREDEFINES "-Dunix -Di386 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
  17.  
  18. #undef SIZE_TYPE
  19. #define SIZE_TYPE "unsigned int"
  20.  
  21. #undef PTRDIFF_TYPE
  22. #define PTRDIFF_TYPE "int"
  23.  
  24. #undef WCHAR_TYPE
  25. #define WCHAR_TYPE "short unsigned int"
  26.  
  27. #define WCHAR_UNSIGNED 1
  28.  
  29. #undef WCHAR_TYPE_SIZE
  30. #define WCHAR_TYPE_SIZE 16
  31.  
  32. #define HANDLE_SYSV_PRAGMA
  33.  
  34. /* There are conflicting reports about whether this system uses
  35.    a different assembler syntax.  wilson@cygnus.com says # is right.  */
  36. #undef COMMENT_BEGIN
  37. #define COMMENT_BEGIN "#"
  38.  
  39. #undef ASM_APP_ON
  40. #define ASM_APP_ON "#APP\n"
  41.  
  42. #undef ASM_APP_OFF
  43. #define ASM_APP_OFF "#NO_APP\n"
  44.  
  45. /* The following macros are stolen from i386v4.h */
  46. /* These have to be defined to get PIC code correct */
  47.  
  48. /* This is how to output an element of a case-vector that is relative.
  49.    This is only used for PIC code.  See comments by the `casesi' insn in
  50.    i386.md for an explanation of the expression this outputs. */
  51.  
  52. #undef ASM_OUTPUT_ADDR_DIFF_ELT
  53. #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
  54.   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
  55.  
  56. /* Indicate that jump tables go in the text section.  This is
  57.    necessary when compiling PIC code.  */
  58.  
  59. #define JUMP_TABLES_IN_TEXT_SECTION
  60.  
  61. /* Don't default to pcc-struct-return, because gcc is the only compiler, and
  62.    we want to retain compatibility with older gcc versions.  */
  63. #define DEFAULT_PCC_STRUCT_RETURN 0
  64.  
  65. /* Profiling routines, partially copied from i386/osfrose.h.  */
  66.  
  67. /* Redefine this to use %eax instead of %edx.  */
  68. #undef FUNCTION_PROFILER
  69. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  70. {                                    \
  71.   if (flag_pic)                                \
  72.     {                                    \
  73.       fprintf (FILE, "\tcall mcount@PLT\n");                \
  74.     }                                    \
  75.   else                                    \
  76.     {                                    \
  77.       fprintf (FILE, "\tcall mcount\n");                \
  78.     }                                    \
  79. }
  80.  
  81. /* A C statement or compound statement to output to FILE some
  82.    assembler code to initialize basic-block profiling for the current
  83.    object module.  This code should call the subroutine
  84.    `__bb_init_func' once per object module, passing it as its sole
  85.    argument the address of a block allocated in the object module.
  86.  
  87.    The name of the block is a local symbol made with this statement:
  88.  
  89.     ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 0);
  90.  
  91.    Of course, since you are writing the definition of
  92.    `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
  93.    can take a short cut in the definition of this macro and use the
  94.    name that you know will result.
  95.  
  96.    The first word of this block is a flag which will be nonzero if the
  97.    object module has already been initialized.  So test this word
  98.    first, and do not call `__bb_init_func' if the flag is nonzero.  */
  99.  
  100. #undef    FUNCTION_BLOCK_PROFILER
  101. #define FUNCTION_BLOCK_PROFILER(STREAM, LABELNO)            \
  102. do                                    \
  103.   {                                    \
  104.     if (!flag_pic)                            \
  105.       {                                    \
  106.     fprintf (STREAM, "\tcmpl $0,%sPBX0\n", LPREFIX);        \
  107.     fprintf (STREAM, "\tjne 0f\n");                    \
  108.     fprintf (STREAM, "\tpushl $%sPBX0\n", LPREFIX);            \
  109.     fprintf (STREAM, "\tcall ___bb_init_func\n");            \
  110.     fprintf (STREAM, "0:\n");                    \
  111.       }                                    \
  112.     else                                \
  113.       {                                    \
  114.     fprintf (STREAM, "\tpushl %eax\n");                \
  115.     fprintf (STREAM, "\tmovl %sPBX0@GOT(%ebx),%eax\n");        \
  116.     fprintf (STREAM, "\tcmpl $0,(%eax)\n");                \
  117.     fprintf (STREAM, "\tjne 0f\n");                    \
  118.     fprintf (STREAM, "\tpushl %eax\n");                \
  119.     fprintf (STREAM, "\tcall ___bb_init_func@PLT\n");        \
  120.     fprintf (STREAM, "0:\n");                    \
  121.     fprintf (STREAM, "\tpopl %eax\n");                \
  122.       }                                    \
  123.   }                                    \
  124. while (0)
  125.  
  126. /* A C statement or compound statement to increment the count
  127.    associated with the basic block number BLOCKNO.  Basic blocks are
  128.    numbered separately from zero within each compilation.  The count
  129.    associated with block number BLOCKNO is at index BLOCKNO in a
  130.    vector of words; the name of this array is a local symbol made
  131.    with this statement:
  132.  
  133.     ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 2);
  134.  
  135.    Of course, since you are writing the definition of
  136.    `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
  137.    can take a short cut in the definition of this macro and use the
  138.    name that you know will result.  */
  139.  
  140. #undef    BLOCK_PROFILER
  141. #define BLOCK_PROFILER(STREAM, BLOCKNO)                    \
  142. do                                    \
  143.   {                                    \
  144.     if (!flag_pic)                            \
  145.       fprintf (STREAM, "\tincl %sPBX2+%d\n", LPREFIX, (BLOCKNO)*4);    \
  146.     else                                \
  147.       {                                    \
  148.     fprintf (STREAM, "\tpushl %eax\n");                \
  149.     fprintf (STREAM, "\tmovl %sPBX2@GOT(%ebx),%eax\n", LPREFIX);    \
  150.     fprintf (STREAM, "\tincl %d(%eax)\n", (BLOCKNO)*4);        \
  151.     fprintf (STREAM, "\tpopl %eax\n");                \
  152.       }                                    \
  153.   }                                    \
  154. while (0)
  155.  
  156.