OSDN Git Service

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