2008-11-18 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / config / i386 / openbsd.h
blobd64f15907b7ee97342dd0613fada507019b7c24d
1 /* Configuration for an OpenBSD i386 target.
2 Copyright (C) 1999, 2000, 2002, 2004, 2007 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 3, 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 COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
21 #define TARGET_VERSION fprintf (stderr, " (OpenBSD/i386)");
23 /* This goes away when the math-emulator is fixed */
24 #undef TARGET_SUBTARGET_DEFAULT
25 #define TARGET_SUBTARGET_DEFAULT \
26 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
28 #define TARGET_OS_CPP_BUILTINS() \
29 do \
30 { \
31 builtin_define ("__unix__"); \
32 builtin_define ("__OpenBSD__"); \
33 builtin_assert ("system=unix"); \
34 builtin_assert ("system=bsd"); \
35 builtin_assert ("system=OpenBSD"); \
36 } \
37 while (0)
39 /* Layout of source language data types. */
41 /* This must agree with <machine/ansi.h> */
42 #undef SIZE_TYPE
43 #define SIZE_TYPE "unsigned int"
45 #undef PTRDIFF_TYPE
46 #define PTRDIFF_TYPE "int"
48 #undef WCHAR_TYPE
49 #define WCHAR_TYPE "int"
51 #undef WCHAR_TYPE_SIZE
52 #define WCHAR_TYPE_SIZE 32
54 /* Assembler format: overall framework. */
56 #undef ASM_APP_ON
57 #define ASM_APP_ON "#APP\n"
59 #undef ASM_APP_OFF
60 #define ASM_APP_OFF "#NO_APP\n"
62 /* Stack & calling: aggregate returns. */
64 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
65 we want to retain compatibility with older gcc versions. */
66 #define DEFAULT_PCC_STRUCT_RETURN 0
68 /* Assembler format: alignment output. */
70 /* Kludgy test: when gas is upgraded, it will have p2align, and no problems
71 with nops. */
72 #ifndef HAVE_GAS_MAX_SKIP_P2ALIGN
73 /* i386 OpenBSD still uses an older gas that doesn't insert nops by default
74 when the .align directive demands to insert extra space in the text
75 segment. */
76 #undef ASM_OUTPUT_ALIGN
77 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
78 if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
79 #endif
81 /* Stack & calling: profiling. */
83 /* OpenBSD's profiler recovers all information from the stack pointer.
84 The icky part is not here, but in machine/profile.h. */
85 #undef FUNCTION_PROFILER
86 #define FUNCTION_PROFILER(FILE, LABELNO) \
87 fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
89 /* Assembler format: exception region output. */
91 /* All configurations that don't use elf must be explicit about not using
92 dwarf unwind information. */
93 #define DWARF2_UNWIND_INFO 0
95 #undef ASM_PREFERRED_EH_DATA_FORMAT
97 #undef ASM_COMMENT_START
98 #define ASM_COMMENT_START ";#"
100 /* OpenBSD gas currently does not support quad, so do not use it. */
101 #undef ASM_QUAD