OSDN Git Service

* i386/386bsd.h, i386/beos-pe.h, i386/bsd386.h, i386/crtdll.h,
[pf3gnuchains/gcc-fork.git] / 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 -D__NetBSD__ \
19  -Asystem(unix) -Asystem(bsd) -Asystem(NetBSD)"
20 \f
21 #undef SIZE_TYPE
22 #define SIZE_TYPE "unsigned int"
23
24 #undef PTRDIFF_TYPE
25 #define PTRDIFF_TYPE "int"
26
27 #undef WCHAR_TYPE
28 #define WCHAR_TYPE "int"
29
30 #undef WCHAR_UNSIGNED
31 #define WCHAR_UNSIGNED 0
32
33 #undef WCHAR_TYPE_SIZE
34 #define WCHAR_TYPE_SIZE 32
35
36 #undef ASM_APP_ON
37 #define ASM_APP_ON "#APP\n"
38
39 #undef ASM_APP_OFF
40 #define ASM_APP_OFF "#NO_APP\n"
41 \f
42 /* The following macros are stolen from i386v4.h */
43 /* These have to be defined to get PIC code correct */
44
45 /* This is how to output an element of a case-vector that is relative.
46    This is only used for PIC code.  See comments by the `casesi' insn in
47    i386.md for an explanation of the expression this outputs. */
48
49 #undef ASM_OUTPUT_ADDR_DIFF_ELT
50 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
51   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
52
53 /* Indicate that jump tables go in the text section.  This is
54    necessary when compiling PIC code.  */
55
56 #define JUMP_TABLES_IN_TEXT_SECTION 1
57
58 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
59    we want to retain compatibility with older gcc versions.  */
60 #define DEFAULT_PCC_STRUCT_RETURN 0
61 \f
62 /* i386 netbsd still uses old binutils that don't insert nops by default
63    when the .align directive demands to insert extra space in the text
64    segment.  */
65 #undef ASM_OUTPUT_ALIGN
66 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
67   if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
68 \f
69 /* Profiling routines, partially copied from i386/osfrose.h.  */
70
71 /* Redefine this to use %eax instead of %edx.  */
72 #undef FUNCTION_PROFILER
73 #define FUNCTION_PROFILER(FILE, LABELNO)  \
74 {                                                                       \
75   if (flag_pic)                                                         \
76     {                                                                   \
77       fprintf (FILE, "\tcall mcount@PLT\n");                            \
78     }                                                                   \
79   else                                                                  \
80     {                                                                   \
81       fprintf (FILE, "\tcall mcount\n");                                \
82     }                                                                   \
83 }
84
85 /* Until they use ELF or something that handles dwarf2 unwinds
86    and initialization stuff better.  */
87 #define DWARF2_UNWIND_INFO 0
88