File:  [DragonFly] / src / contrib / gcc / config / i386 / Attic / openbsd.h
Revision 1.2: download - view: text, annotated - select for diffs
Sun Nov 9 02:34:00 2003 UTC (11 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: HEAD, DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Core integer types header file reorganization stage 2/2:

Adjust main source files to reflect stdint.h and other changes.  Primarily
this means getting rid of the _BSD_XXX type useage but in some cases,
such as for tar, it means getting rid of #define overrides for intmax_t
and uintmax_t.

    1: /* Configuration for an OpenBSD i386 target.
    2:    
    3:    Copyright (C) 1999 Free Software Foundation, Inc.
    4: 
    5: This file is part of GNU CC.
    6: 
    7: GNU CC 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 2, or (at your option)
   10: any later version.
   11: 
   12: GNU CC 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.
   16: 
   17: You should have received a copy of the GNU General Public License
   18: along with GNU CC; see the file COPYING.  If not, write to
   19: the Free Software Foundation, 59 Temple Place - Suite 330,
   20: Boston, MA 02111-1307, USA.  */
   21: 
   22: /* $DragonFly: src/contrib/gcc/config/i386/openbsd.h,v 1.2 2003/11/09 02:34:00 dillon Exp $ */
   23: 
   24: /* This is tested by i386gas.h.  */
   25: #define YES_UNDERSCORES
   26: 
   27: #include <i386/gstabs.h>
   28: 
   29: /* Get perform_* macros to build libgcc.a.  */
   30: #include <i386/perform.h>
   31: 
   32: /* Get generic OpenBSD definitions.  */
   33: #define OBSD_OLD_GAS
   34: #include <openbsd.h>
   35: 
   36: /* This goes away when the math-emulator is fixed */
   37: #undef TARGET_DEFAULT
   38: #define TARGET_DEFAULT \
   39:   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
   40: 
   41: /* Run-time target specifications */
   42: #define CPP_PREDEFINES "-D__unix__ -D__i386__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(i386) -Amachine(i386)"
   43: 
   44: /* Layout of source language data types.  */
   45: 
   46: /* This must agree with <machine/stdint.h> */
   47: #undef SIZE_TYPE
   48: #define SIZE_TYPE "unsigned int"
   49: 
   50: #undef PTRDIFF_TYPE
   51: #define PTRDIFF_TYPE "int"
   52: 
   53: #undef WCHAR_TYPE
   54: #define WCHAR_TYPE "int"
   55: 
   56: #undef WCHAR_TYPE_SIZE
   57: #define WCHAR_TYPE_SIZE 32
   58: 
   59: /* Assembler format: overall framework.  */
   60: 
   61: #undef ASM_APP_ON
   62: #define ASM_APP_ON "#APP\n"
   63: 
   64: #undef ASM_APP_OFF
   65: #define ASM_APP_OFF "#NO_APP\n"
   66: 
   67: /* The following macros were originally stolen from i386v4.h.
   68:    These have to be defined to get PIC code correct.  */
   69: 
   70: /* Assembler format: dispatch tables.  */
   71: 
   72: /* How to output an element of a case-vector that is relative.
   73:    This is only used for PIC code.  See comments by the `casesi' insn in
   74:    i386.md for an explanation of the expression this outputs.  */
   75: #undef ASM_OUTPUT_ADDR_DIFF_ELT
   76: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
   77:   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
   78: 
   79: /* Assembler format: sections.  */
   80: 
   81: /* Indicate when jump tables go in the text section.  This is
   82:    necessary when compiling PIC code.  */
   83: #define JUMP_TABLES_IN_TEXT_SECTION  (flag_pic)
   84: 
   85: /* Stack & calling: aggregate returns.  */
   86: 
   87: /* Don't default to pcc-struct-return, because gcc is the only compiler, and
   88:    we want to retain compatibility with older gcc versions.  */
   89: #define DEFAULT_PCC_STRUCT_RETURN 0
   90: 
   91: /* Assembler format: alignment output.  */
   92: 
   93: /* Kludgy test: when gas is upgraded, it will have p2align, and no problems
   94:    with nops.  */
   95: #ifndef HAVE_GAS_MAX_SKIP_P2ALIGN
   96: /* i386 OpenBSD still uses an older gas that doesn't insert nops by default
   97:    when the .align directive demands to insert extra space in the text
   98:    segment.  */
   99: #undef ASM_OUTPUT_ALIGN
  100: #define ASM_OUTPUT_ALIGN(FILE,LOG) \
  101:   if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
  102: #endif
  103: 
  104: /* Stack & calling: profiling.  */
  105: 
  106: /* OpenBSD's profiler recovers all information from the stack pointer.
  107:    The icky part is not here, but in machine/profile.h.  */
  108: #undef FUNCTION_PROFILER
  109: #define FUNCTION_PROFILER(FILE, LABELNO)  \
  110:   fputs (flag_pic ? "\tcall mcount@PLT\n": "\tcall mcount\n", FILE);
  111: 
  112: /* Assembler format: exception region output.  */
  113: 
  114: /* All configurations that don't use elf must be explicit about not using
  115:    dwarf unwind information. egcs doesn't try too hard to check internal
  116:    configuration files...  */
  117: #define DWARF2_UNWIND_INFO 0
  118: 
  119: /* Assembler format: alignment output.  */
  120: 
  121: /* A C statement to output to the stdio stream FILE an assembler
  122:    command to advance the location counter to a multiple of 1<<LOG
  123:    bytes if it is within MAX_SKIP bytes.
  124: 
  125:    This will be used to align code labels according to Intel 
  126:    recommendations, in prevision of binutils upgrade.  */
  127: #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
  128: #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)			\
  129:   do {									\
  130:     if ((LOG) != 0) {							\
  131:       if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG));	\
  132:       else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
  133:     }									\
  134:   } while (0)
  135: #endif
  136: 
  137: /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h.  */
  138: