OSDN Git Service

* config/i386/freebsd-aout.h (NO_PROFILE_COUNTERS): New macro.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / openbsd.h
1 /* Configuration for an OpenBSD i386 target.
2    Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21
22 #define TARGET_VERSION fprintf (stderr, " (OpenBSD/i386)");
23
24 /* This goes away when the math-emulator is fixed */
25 #undef TARGET_SUBTARGET_DEFAULT
26 #define TARGET_SUBTARGET_DEFAULT \
27   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
28
29 #define TARGET_OS_CPP_BUILTINS()                \
30   do                                            \
31     {                                           \
32         builtin_define ("__unix__");            \
33         builtin_define ("__OpenBSD__");         \
34         builtin_assert ("system=unix");         \
35         builtin_assert ("system=bsd");          \
36         builtin_assert ("system=OpenBSD");      \
37     }                                           \
38   while (0)
39
40 /* Layout of source language data types.  */
41
42 /* This must agree with <machine/ansi.h> */
43 #undef SIZE_TYPE
44 #define SIZE_TYPE "unsigned int"
45
46 #undef PTRDIFF_TYPE
47 #define PTRDIFF_TYPE "int"
48
49 #undef WCHAR_TYPE
50 #define WCHAR_TYPE "int"
51
52 #undef WCHAR_TYPE_SIZE
53 #define WCHAR_TYPE_SIZE 32
54
55 /* Assembler format: overall framework.  */
56
57 #undef ASM_APP_ON
58 #define ASM_APP_ON "#APP\n"
59
60 #undef ASM_APP_OFF
61 #define ASM_APP_OFF "#NO_APP\n"
62
63 /* Stack & calling: aggregate returns.  */
64
65 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
66    we want to retain compatibility with older gcc versions.  */
67 #define DEFAULT_PCC_STRUCT_RETURN 0
68
69 /* Assembler format: alignment output.  */
70
71 /* Kludgy test: when gas is upgraded, it will have p2align, and no problems
72    with nops.  */
73 #ifndef HAVE_GAS_MAX_SKIP_P2ALIGN
74 /* i386 OpenBSD still uses an older gas that doesn't insert nops by default
75    when the .align directive demands to insert extra space in the text
76    segment.  */
77 #undef ASM_OUTPUT_ALIGN
78 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
79   if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
80 #endif
81
82 /* Stack & calling: profiling.  */
83
84 /* OpenBSD's profiler recovers all information from the stack pointer.
85    The icky part is not here, but in machine/profile.h.  */
86 #undef FUNCTION_PROFILER
87 #define FUNCTION_PROFILER(FILE, LABELNO)  \
88   fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
89
90 /* Assembler format: exception region output.  */
91
92 /* All configurations that don't use elf must be explicit about not using
93    dwarf unwind information. egcs doesn't try too hard to check internal
94    configuration files...  */
95 #define DWARF2_UNWIND_INFO 0
96
97 #undef ASM_PREFERRED_EH_DATA_FORMAT
98
99 #undef ASM_COMMENT_START
100 #define ASM_COMMENT_START ";#"
101
102 /* OpenBSD gas currently does not support quad, so do not use it.  */
103 #undef ASM_QUAD