1  /* Definitions for Intel 386 running DragonFly with ELF format
       2     Copyright (C) 2014-2023 Free Software Foundation, Inc.
       3     Contributed by John Marino <gnugcc@marino.st>
       4  
       5  This file is part of GCC.
       6  
       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)
      10  any later version.
      11  
      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.
      16  
      17  Under Section 7 of GPL version 3, you are granted additional
      18  permissions described in the GCC Runtime Library Exception, version
      19  3.1, as published by the Free Software Foundation.
      20  
      21  You should have received a copy of the GNU General Public License and
      22  a copy of the GCC Runtime Library Exception along with this program;
      23  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
      24  <http://www.gnu.org/licenses/>.  */
      25  
      26  
      27  /* Override the default comment-starter of "/".  */
      28  #undef  ASM_COMMENT_START
      29  #define ASM_COMMENT_START "#"
      30  
      31  #undef  ASM_APP_ON
      32  #define ASM_APP_ON "#APP\n"
      33  
      34  #undef  ASM_APP_OFF
      35  #define ASM_APP_OFF "#NO_APP\n"
      36  
      37  #undef  DEBUGGER_REGNO
      38  #define DEBUGGER_REGNO(n) \
      39    (TARGET_64BIT ? debugger64_register_map[n] : svr4_debugger_register_map[n])
      40  
      41  #undef  NO_PROFILE_COUNTERS
      42  #define NO_PROFILE_COUNTERS	1
      43  
      44  /* Tell final.cc that we don't need a label passed to mcount.  */
      45  
      46  #undef  MCOUNT_NAME
      47  #define MCOUNT_NAME ".mcount"
      48  
      49  /* Make gcc agree with <machine/ansi.h>.  */
      50  
      51  #undef  SIZE_TYPE
      52  #define SIZE_TYPE	(TARGET_64BIT ? "long unsigned int" : "unsigned int")
      53  
      54  #undef  PTRDIFF_TYPE
      55  #define PTRDIFF_TYPE	(TARGET_64BIT ? "long int" : "int")
      56  
      57  #undef  WCHAR_TYPE_SIZE
      58  #define WCHAR_TYPE_SIZE	(TARGET_64BIT ? 32 : BITS_PER_WORD)
      59  
      60  #undef  SUBTARGET_EXTRA_SPECS	/* i386.h bogusly defines it.  */
      61  #define SUBTARGET_EXTRA_SPECS \
      62    { "dfbsd_dynamic_linker", DFBSD_DYNAMIC_LINKER }
      63  
      64  /* Don't default to pcc-struct-return, we want to retain compatibility with
      65     older gcc versions AND pcc-struct-return is nonreentrant.
      66     (even though the SVR4 ABI for the i386 says that records and unions are
      67     returned in memory).  */
      68  
      69  #undef  DEFAULT_PCC_STRUCT_RETURN
      70  #define DEFAULT_PCC_STRUCT_RETURN 0
      71  
      72  /* DragonFly sets the rounding precision of the FPU to 53 bits.  Let the
      73     compiler get the contents of <float.h> and std::numeric_limits correct.  */
      74  #undef TARGET_96_ROUND_53_LONG_DOUBLE
      75  #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
      76  
      77  /* Static stack checking is supported by means of probes.  */
      78  #define STACK_CHECK_STATIC_BUILTIN 1
      79  
      80  /* Support for i386 was removed from DragonFly in 2007  */
      81  #define SUBTARGET32_DEFAULT_CPU "i486"
      82  
      83  #define TARGET_ASM_FILE_END file_end_indicate_exec_stack