openbsd.h revision 102780
150397Sobrien/* Configuration for an OpenBSD i386 target. 290075Sobrien Copyright (C) 1999, 2000 Free Software Foundation, Inc. 350397Sobrien 450397SobrienThis file is part of GNU CC. 550397Sobrien 650397SobrienGNU CC is free software; you can redistribute it and/or modify 750397Sobrienit under the terms of the GNU General Public License as published by 850397Sobrienthe Free Software Foundation; either version 2, or (at your option) 950397Sobrienany later version. 1050397Sobrien 1150397SobrienGNU CC is distributed in the hope that it will be useful, 1250397Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 1350397SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1450397SobrienGNU General Public License for more details. 1550397Sobrien 1650397SobrienYou should have received a copy of the GNU General Public License 1750397Sobrienalong with GNU CC; see the file COPYING. If not, write to 1850397Sobrienthe Free Software Foundation, 59 Temple Place - Suite 330, 1950397SobrienBoston, MA 02111-1307, USA. */ 2050397Sobrien 2150397Sobrien/* This is tested by i386gas.h. */ 2250397Sobrien#define YES_UNDERSCORES 2350397Sobrien 2450397Sobrien#include <i386/gstabs.h> 2550397Sobrien 2650397Sobrien/* Get generic OpenBSD definitions. */ 2750397Sobrien#define OBSD_OLD_GAS 2850397Sobrien#include <openbsd.h> 2950397Sobrien 3052284Sobrien/* This goes away when the math-emulator is fixed */ 3190075Sobrien#undef TARGET_SUBTARGET_DEFAULT 3290075Sobrien#define TARGET_SUBTARGET_DEFAULT \ 3352284Sobrien (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) 3452284Sobrien 3550397Sobrien/* Run-time target specifications */ 3690075Sobrien#define CPP_PREDEFINES "-D__unix__ -D__OpenBSD__ \ 3790075Sobrien -Asystem=unix -Asystem=bsd -Asystem=OpenBSD" 3850397Sobrien 3950397Sobrien/* Layout of source language data types. */ 4050397Sobrien 4150397Sobrien/* This must agree with <machine/ansi.h> */ 4250397Sobrien#undef SIZE_TYPE 4350397Sobrien#define SIZE_TYPE "unsigned int" 4450397Sobrien 4550397Sobrien#undef PTRDIFF_TYPE 4650397Sobrien#define PTRDIFF_TYPE "int" 4750397Sobrien 4850397Sobrien#undef WCHAR_TYPE 4950397Sobrien#define WCHAR_TYPE "int" 5050397Sobrien 5150397Sobrien#undef WCHAR_TYPE_SIZE 5250397Sobrien#define WCHAR_TYPE_SIZE 32 5350397Sobrien 5450397Sobrien/* Assembler format: overall framework. */ 5550397Sobrien 5650397Sobrien#undef ASM_APP_ON 5750397Sobrien#define ASM_APP_ON "#APP\n" 5850397Sobrien 5950397Sobrien#undef ASM_APP_OFF 6050397Sobrien#define ASM_APP_OFF "#NO_APP\n" 6150397Sobrien 6250397Sobrien/* Stack & calling: aggregate returns. */ 6350397Sobrien 6450397Sobrien/* Don't default to pcc-struct-return, because gcc is the only compiler, and 6550397Sobrien we want to retain compatibility with older gcc versions. */ 6650397Sobrien#define DEFAULT_PCC_STRUCT_RETURN 0 6750397Sobrien 6850397Sobrien/* Assembler format: alignment output. */ 6950397Sobrien 7050397Sobrien/* Kludgy test: when gas is upgraded, it will have p2align, and no problems 7150397Sobrien with nops. */ 7250397Sobrien#ifndef HAVE_GAS_MAX_SKIP_P2ALIGN 7350397Sobrien/* i386 OpenBSD still uses an older gas that doesn't insert nops by default 7450397Sobrien when the .align directive demands to insert extra space in the text 7550397Sobrien segment. */ 7650397Sobrien#undef ASM_OUTPUT_ALIGN 7750397Sobrien#define ASM_OUTPUT_ALIGN(FILE,LOG) \ 7850397Sobrien if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG)) 7950397Sobrien#endif 8050397Sobrien 8150397Sobrien/* Stack & calling: profiling. */ 8250397Sobrien 8350397Sobrien/* OpenBSD's profiler recovers all information from the stack pointer. 8450397Sobrien The icky part is not here, but in machine/profile.h. */ 8550397Sobrien#undef FUNCTION_PROFILER 8650397Sobrien#define FUNCTION_PROFILER(FILE, LABELNO) \ 8750397Sobrien fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE); 8850397Sobrien 8950397Sobrien/* Assembler format: exception region output. */ 9050397Sobrien 9150397Sobrien/* All configurations that don't use elf must be explicit about not using 9250397Sobrien dwarf unwind information. egcs doesn't try too hard to check internal 9350397Sobrien configuration files... */ 9450397Sobrien#define DWARF2_UNWIND_INFO 0 9550397Sobrien 9690075Sobrien#undef ASM_PREFERRED_EH_DATA_FORMAT 9790075Sobrien 9850397Sobrien 9950397Sobrien/* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */ 10050397Sobrien 10190075Sobrien#undef ASM_COMMENT_START 10290075Sobrien#define ASM_COMMENT_START ";#" 10390075Sobrien 104102780Skan/* OpenBSD gas currently does not support quad, so do not use it. */ 105102780Skan#undef ASM_QUAD 106