1 /* Configuration for an OpenBSD i386 target.
2 Copyright (C) 1999, 2000, 2002, 2004, 2007, 2011
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
22 /* This goes away when the math-emulator is fixed */
23 #undef TARGET_SUBTARGET_DEFAULT
24 #define TARGET_SUBTARGET_DEFAULT \
25 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
27 #define TARGET_OS_CPP_BUILTINS() \
30 builtin_define ("__unix__"); \
31 builtin_define ("__OpenBSD__"); \
32 builtin_assert ("system=unix"); \
33 builtin_assert ("system=bsd"); \
34 builtin_assert ("system=OpenBSD"); \
38 /* Layout of source language data types. */
40 /* This must agree with <machine/ansi.h> */
42 #define SIZE_TYPE "unsigned int"
45 #define PTRDIFF_TYPE "int"
48 #define WCHAR_TYPE "int"
50 #undef WCHAR_TYPE_SIZE
51 #define WCHAR_TYPE_SIZE 32
53 /* Assembler format: overall framework. */
56 #define ASM_APP_ON "#APP\n"
59 #define ASM_APP_OFF "#NO_APP\n"
61 /* Stack & calling: aggregate returns. */
63 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
64 we want to retain compatibility with older gcc versions. */
65 #define DEFAULT_PCC_STRUCT_RETURN 0
67 /* Assembler format: alignment output. */
69 /* Kludgy test: when gas is upgraded, it will have p2align, and no problems
71 #ifndef HAVE_GAS_MAX_SKIP_P2ALIGN
72 /* i386 OpenBSD still uses an older gas that doesn't insert nops by default
73 when the .align directive demands to insert extra space in the text
75 #undef ASM_OUTPUT_ALIGN
76 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
77 if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
80 /* Stack & calling: profiling. */
82 /* OpenBSD's profiler recovers all information from the stack pointer.
83 The icky part is not here, but in machine/profile.h. */
84 #undef FUNCTION_PROFILER
85 #define FUNCTION_PROFILER(FILE, LABELNO) \
86 fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
88 /* Assembler format: exception region output. */
90 /* All configurations that don't use elf must be explicit about not using
91 dwarf unwind information. */
92 #define DWARF2_UNWIND_INFO 0
94 #undef ASM_PREFERRED_EH_DATA_FORMAT
96 #undef ASM_COMMENT_START
97 #define ASM_COMMENT_START ";#"
99 /* OpenBSD gas currently does not support quad, so do not use it. */
102 #define TARGET_HAVE_NAMED_SECTIONS false