OSDN Git Service

* configure.ac (i[34567]86-*-*): Handle Solaris 2/x86 TLS support
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / netbsd.h
1 /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2    2004 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
10
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
19
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23 <http://www.gnu.org/licenses/>.  */
24
25 #define TARGET_OS_CPP_BUILTINS()                \
26   do                                            \
27     {                                           \
28       NETBSD_OS_CPP_BUILTINS_AOUT();            \
29     }                                           \
30   while (0)
31
32 #define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 a.out)");
33
34 /* This goes away when the math-emulator is fixed */
35 #undef TARGET_SUBTARGET_DEFAULT
36 #define TARGET_SUBTARGET_DEFAULT \
37   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
38
39 #undef SUBTARGET_EXTRA_SPECS
40 #define SUBTARGET_EXTRA_SPECS                   \
41   { "netbsd_cpp_spec", NETBSD_CPP_SPEC },
42
43 #undef CPP_SPEC
44 #define CPP_SPEC "%(netbsd_cpp_spec)"
45
46 \f
47 #undef SIZE_TYPE
48 #define SIZE_TYPE "unsigned int"
49
50 #undef PTRDIFF_TYPE
51 #define PTRDIFF_TYPE "int"
52
53 #undef ASM_APP_ON
54 #define ASM_APP_ON "#APP\n"
55
56 #undef ASM_APP_OFF
57 #define ASM_APP_OFF "#NO_APP\n"
58
59 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
60    we want to retain compatibility with older gcc versions.  */
61 #define DEFAULT_PCC_STRUCT_RETURN 0
62 \f
63 /* i386 netbsd still uses old binutils that don't insert nops by default
64    when the .align directive demands to insert extra space in the text
65    segment.  */
66 #undef ASM_OUTPUT_ALIGN
67 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
68   if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
69 \f
70 /* Profiling routines, partially copied from i386/osfrose.h.  */
71
72 /* Redefine this to use %eax instead of %edx.  */
73 #undef FUNCTION_PROFILER
74 #define FUNCTION_PROFILER(FILE, LABELNO)  \
75 {                                                                       \
76   if (flag_pic)                                                         \
77     {                                                                   \
78       fprintf (FILE, "\tcall mcount@PLT\n");                            \
79     }                                                                   \
80   else                                                                  \
81     {                                                                   \
82       fprintf (FILE, "\tcall mcount\n");                                \
83     }                                                                   \
84 }
85
86 /* Until they use ELF or something that handles dwarf2 unwinds
87    and initialization stuff better.  */
88 #define DWARF2_UNWIND_INFO 0
89
90 /* Redefine this so that it becomes "_GLOBAL_OFFSET_TABLE_" when the label
91    prefix is added.  */
92 #undef GOT_SYMBOL_NAME
93 #define GOT_SYMBOL_NAME "GLOBAL_OFFSET_TABLE_"
94
95 /* Attempt to enable execute permissions on the stack.  */
96 #define ENABLE_EXECUTE_STACK NETBSD_ENABLE_EXECUTE_STACK