Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / gcc / config / i386 / netbsd.h
1 /* This is tested by i386gas.h.  */
2 #define YES_UNDERSCORES
3
4 #include <i386/gstabs.h>
5
6 /* Get perform_* macros to build libgcc.a.  */
7 #include <i386/perform.h>
8
9 /* Get generic NetBSD definitions.  */
10 #include <netbsd.h>
11
12 /* This goes away when the math-emulator is fixed */
13 #undef TARGET_DEFAULT
14 #define TARGET_DEFAULT \
15   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
16
17 #undef CPP_PREDEFINES
18 #define CPP_PREDEFINES "-Dunix -Di386 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
19 \f
20 #undef SIZE_TYPE
21 #define SIZE_TYPE "unsigned int"
22
23 #undef PTRDIFF_TYPE
24 #define PTRDIFF_TYPE "int"
25
26 #undef WCHAR_TYPE
27 #define WCHAR_TYPE "int"
28
29 #undef WCHAR_UNSIGNED
30 #define WCHAR_UNSIGNED 0
31
32 #undef WCHAR_TYPE_SIZE
33 #define WCHAR_TYPE_SIZE 32
34
35 #undef ASM_APP_ON
36 #define ASM_APP_ON "#APP\n"
37
38 #undef ASM_APP_OFF
39 #define ASM_APP_OFF "#NO_APP\n"
40 \f
41 /* The following macros are stolen from i386v4.h */
42 /* These have to be defined to get PIC code correct */
43
44 /* This is how to output an element of a case-vector that is relative.
45    This is only used for PIC code.  See comments by the `casesi' insn in
46    i386.md for an explanation of the expression this outputs. */
47
48 #undef ASM_OUTPUT_ADDR_DIFF_ELT
49 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
50   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
51
52 /* Indicate that jump tables go in the text section.  This is
53    necessary when compiling PIC code.  */
54
55 #define JUMP_TABLES_IN_TEXT_SECTION 1
56
57 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
58    we want to retain compatibility with older gcc versions.  */
59 #define DEFAULT_PCC_STRUCT_RETURN 0
60 \f
61 /* i386 netbsd still uses old binutils that don't insert nops by default
62    when the .align directive demands to insert extra space in the text
63    segment.  */
64 #undef ASM_OUTPUT_ALIGN
65 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
66   if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
67 \f
68 /* Profiling routines, partially copied from i386/osfrose.h.  */
69
70 /* Redefine this to use %eax instead of %edx.  */
71 #undef FUNCTION_PROFILER
72 #define FUNCTION_PROFILER(FILE, LABELNO)  \
73 {                                                                       \
74   if (flag_pic)                                                         \
75     {                                                                   \
76       fprintf (FILE, "\tcall mcount@PLT\n");                            \
77     }                                                                   \
78   else                                                                  \
79     {                                                                   \
80       fprintf (FILE, "\tcall mcount\n");                                \
81     }                                                                   \
82 }
83
84 /* Until they use ELF or something that handles dwarf2 unwinds
85    and initialization stuff better.  */
86 #define DWARF2_UNWIND_INFO 0
87