Initial revision
[official-gcc.git] / gcc / config / i386 / 386bsd.h
blobc93279ffb00b411049b113e344fb116c96d8d2e1
1 /* Configuration for an i386 running 386BSD as the target machine. */
3 /* This is tested by i386gas.h. */
4 #define YES_UNDERSCORES
6 #include "i386/gstabs.h"
8 /* Get perform_* macros to build libgcc.a. */
9 #include "i386/perform.h"
11 #undef CPP_PREDEFINES
12 #define CPP_PREDEFINES "-Dunix -Di386 -D____386BSD____ -D__386BSD__ -DBSD_NET2 -Asystem(unix) -Asystem(bsd) -Acpu(i386) -Amachine(i386)"
14 /* Like the default, except no -lg. */
15 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
17 #undef SIZE_TYPE
18 #define SIZE_TYPE "unsigned int"
20 #undef PTRDIFF_TYPE
21 #define PTRDIFF_TYPE "int"
23 #undef WCHAR_TYPE
24 #define WCHAR_TYPE "short unsigned int"
26 #define WCHAR_UNSIGNED 1
28 #undef WCHAR_TYPE_SIZE
29 #define WCHAR_TYPE_SIZE 16
31 /* 386BSD does have atexit. */
33 #define HAVE_ATEXIT
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 } \
52 #undef ASM_APP_ON
53 #define ASM_APP_ON "#APP\n"
55 #undef ASM_APP_OFF
56 #define ASM_APP_OFF "#NO_APP\n"
58 /* The following macros are stolen from i386v4.h */
59 /* These have to be defined to get PIC code correct */
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. */
65 #undef ASM_OUTPUT_ADDR_DIFF_ELT
66 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
67 fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
69 /* Indicate that jump tables go in the text section. This is
70 necessary when compiling PIC code. */
72 #define JUMP_TABLES_IN_TEXT_SECTION
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