2006-01-30 Marcin Dalecki <martin@dalecki.de>
[official-gcc.git] / gcc / config / i386 / openbsd.h
blob6c5be7262bdd5026f038150ca3c448f8cf824f89
1 /* Configuration for an OpenBSD i386 target.
2 Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC 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.
11 GCC 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.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to
18 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
22 #define TARGET_VERSION fprintf (stderr, " (OpenBSD/i386)");
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)
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)
40 /* Layout of source language data types. */
42 /* This must agree with <machine/ansi.h> */
43 #undef SIZE_TYPE
44 #define SIZE_TYPE "unsigned int"
46 #undef PTRDIFF_TYPE
47 #define PTRDIFF_TYPE "int"
49 #undef WCHAR_TYPE
50 #define WCHAR_TYPE "int"
52 #undef WCHAR_TYPE_SIZE
53 #define WCHAR_TYPE_SIZE 32
55 /* Assembler format: overall framework. */
57 #undef ASM_APP_ON
58 #define ASM_APP_ON "#APP\n"
60 #undef ASM_APP_OFF
61 #define ASM_APP_OFF "#NO_APP\n"
63 /* Stack & calling: aggregate returns. */
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
69 /* Assembler format: alignment output. */
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
82 /* Stack & calling: profiling. */
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);
90 /* Assembler format: exception region output. */
92 /* All configurations that don't use elf must be explicit about not using
93 dwarf unwind information. */
94 #define DWARF2_UNWIND_INFO 0
96 #undef ASM_PREFERRED_EH_DATA_FORMAT
98 #undef ASM_COMMENT_START
99 #define ASM_COMMENT_START ";#"
101 /* OpenBSD gas currently does not support quad, so do not use it. */
102 #undef ASM_QUAD