Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / gcc / config / i386 / 386bsd.h
1 /* Configuration for an i386 running 386BSD as the target machine.  */
2
3 /* This is tested by i386gas.h.  */
4 #define YES_UNDERSCORES
5
6 #include "i386/gstabs.h"
7
8 /* Get perform_* macros to build libgcc.a.  */
9 #include "i386/perform.h"
10
11 #undef CPP_PREDEFINES
12 #define CPP_PREDEFINES "-Dunix -Di386 -D____386BSD____ -D__386BSD__ -DBSD_NET2 -Asystem(unix) -Asystem(bsd) -Acpu(i386) -Amachine(i386)"
13
14 /* Like the default, except no -lg.  */
15 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
16
17 #undef SIZE_TYPE
18 #define SIZE_TYPE "unsigned int"
19
20 #undef PTRDIFF_TYPE
21 #define PTRDIFF_TYPE "int"
22
23 #undef WCHAR_TYPE
24 #define WCHAR_TYPE "short unsigned int"
25
26 #define WCHAR_UNSIGNED 1
27
28 #undef WCHAR_TYPE_SIZE
29 #define WCHAR_TYPE_SIZE 16
30
31 /* 386BSD does have atexit.  */
32
33 #define HAVE_ATEXIT
34
35 /* Redefine this to use %eax instead of %edx.  */
36 #undef FUNCTION_PROFILER
37 #define FUNCTION_PROFILER(FILE, LABELNO)  \
38 {                                                                       \
39   if (flag_pic)                                                         \
40     {                                                                   \
41       fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n",              \
42                LPREFIX, (LABELNO));                                     \
43       fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");                    \
44     }                                                                   \
45   else                                                                  \
46     {                                                                   \
47       fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO));      \
48       fprintf (FILE, "\tcall mcount\n");                                \
49     }                                                                   \
50 }
51
52 #undef ASM_APP_ON
53 #define ASM_APP_ON "#APP\n"
54
55 #undef ASM_APP_OFF
56 #define ASM_APP_OFF "#NO_APP\n"
57 \f
58 /* The following macros are stolen from i386v4.h */
59 /* These have to be defined to get PIC code correct */
60
61 /* This is how to output an element of a case-vector that is relative.
62    This is only used for PIC code.  See comments by the `casesi' insn in
63    i386.md for an explanation of the expression this outputs. */
64
65 #undef ASM_OUTPUT_ADDR_DIFF_ELT
66 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
67   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
68
69 /* Indicate that jump tables go in the text section.  This is
70    necessary when compiling PIC code.  */
71
72 #define JUMP_TABLES_IN_TEXT_SECTION 1
73
74 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
75    we want to retain compatibility with older gcc versions.  */
76 #define DEFAULT_PCC_STRUCT_RETURN 0