OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [config/] [i386/] [sol2.h] - Diff between revs 282 and 384

Only display areas with differences | Details | Blame | View Log

Rev 282 Rev 384
/* Target definitions for GCC for Intel 80386 running Solaris 2
/* Target definitions for GCC for Intel 80386 running Solaris 2
   Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
   Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
   2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
   2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
   Contributed by Fred Fish (fnf@cygnus.com).
   Contributed by Fred Fish (fnf@cygnus.com).
 
 
This file is part of GCC.
This file is part of GCC.
 
 
GCC is free software; you can redistribute it and/or modify
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
the Free Software Foundation; either version 3, or (at your option)
any later version.
any later version.
 
 
GCC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
<http://www.gnu.org/licenses/>.  */
 
 
/* The Solaris 2.0 x86 linker botches alignment of code sections.
/* The Solaris 2.0 x86 linker botches alignment of code sections.
   It tries to align to a 16 byte boundary by padding with 0x00000090
   It tries to align to a 16 byte boundary by padding with 0x00000090
   ints, rather than 0x90 bytes (nop).  This generates trash in the
   ints, rather than 0x90 bytes (nop).  This generates trash in the
   ".init" section since the contribution from crtbegin.o is only 7
   ".init" section since the contribution from crtbegin.o is only 7
   bytes.  The linker pads it to 16 bytes with a single 0x90 byte, and
   bytes.  The linker pads it to 16 bytes with a single 0x90 byte, and
   two 0x00000090 ints, which generates a segmentation violation when
   two 0x00000090 ints, which generates a segmentation violation when
   executed.  This macro forces the assembler to do the padding, since
   executed.  This macro forces the assembler to do the padding, since
   it knows what it is doing.  */
   it knows what it is doing.  */
#define FORCE_CODE_SECTION_ALIGN  asm(ALIGN_ASM_OP "16");
#define FORCE_CODE_SECTION_ALIGN  asm(ALIGN_ASM_OP "16");
 
 
/* Old versions of the Solaris assembler can not handle the difference of
/* Old versions of the Solaris assembler can not handle the difference of
   labels in different sections, so force DW_EH_PE_datarel.  */
   labels in different sections, so force DW_EH_PE_datarel.  */
#undef ASM_PREFERRED_EH_DATA_FORMAT
#undef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                       \
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                       \
  (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0)                          \
  (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0)                          \
               | (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4       \
               | (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4       \
                  : DW_EH_PE_datarel))                                  \
                  : DW_EH_PE_datarel))                                  \
   : DW_EH_PE_absptr)
   : DW_EH_PE_absptr)
 
 
/* The Solaris linker will not merge a read-only .eh_frame section
/* The Solaris linker will not merge a read-only .eh_frame section
   with a read-write .eh_frame section.  None of the encodings used
   with a read-write .eh_frame section.  None of the encodings used
   with non-PIC code require runtime relocations.  In 64-bit mode,
   with non-PIC code require runtime relocations.  In 64-bit mode,
   since there is no backwards compatibility issue, we use a read-only
   since there is no backwards compatibility issue, we use a read-only
   section for .eh_frame.  In 32-bit mode, we use a writable .eh_frame
   section for .eh_frame.  In 32-bit mode, we use a writable .eh_frame
   section in order to be compatible with G++ for Solaris x86.  */
   section in order to be compatible with G++ for Solaris x86.  */
#undef EH_TABLES_CAN_BE_READ_ONLY
#undef EH_TABLES_CAN_BE_READ_ONLY
#define EH_TABLES_CAN_BE_READ_ONLY (TARGET_64BIT)
#define EH_TABLES_CAN_BE_READ_ONLY (TARGET_64BIT)
 
 
/* Solaris 2/Intel as chokes on #line directives.  */
/* Solaris 2/Intel as chokes on #line directives.  */
#undef CPP_SPEC
#undef CPP_SPEC
#define CPP_SPEC "%{,assembler-with-cpp:-P} %(cpp_subtarget)"
#define CPP_SPEC "%{,assembler-with-cpp:-P} %(cpp_subtarget)"
 
 
/* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
/* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
   gives many warnings: R_386_32 relocation is used for symbol ".text".  */
   gives many warnings: R_386_32 relocation is used for symbol ".text".  */
#undef ASM_SPEC
#undef ASM_SPEC
#define ASM_SPEC "\
#define ASM_SPEC "\
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
%(asm_cpu) \
%(asm_cpu) \
"
"
 
 
#define ASM_CPU_SPEC ""
#define ASM_CPU_SPEC ""
 
 
#undef SUBTARGET_EXTRA_SPECS
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
#define SUBTARGET_EXTRA_SPECS \
  { "cpp_subtarget",    CPP_SUBTARGET_SPEC },   \
  { "cpp_subtarget",    CPP_SUBTARGET_SPEC },   \
  { "asm_cpu",          ASM_CPU_SPEC },         \
  { "asm_cpu",          ASM_CPU_SPEC },         \
  { "startfile_arch",   STARTFILE_ARCH_SPEC },  \
  { "startfile_arch",   STARTFILE_ARCH_SPEC },  \
  { "link_arch",        LINK_ARCH_SPEC }
  { "link_arch",        LINK_ARCH_SPEC }
 
 
#undef LOCAL_LABEL_PREFIX
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."
#define LOCAL_LABEL_PREFIX "."
 
 
/* The 32-bit Solaris assembler does not support .quad.  Do not use it.  */
/* The 32-bit Solaris assembler does not support .quad.  Do not use it.  */
#ifndef HAVE_AS_IX86_QUAD
#ifndef HAVE_AS_IX86_QUAD
#undef ASM_QUAD
#undef ASM_QUAD
#endif
#endif
 
 
/* The Solaris assembler wants a .local for non-exported aliases.  */
/* The Solaris assembler wants a .local for non-exported aliases.  */
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)   \
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)   \
  do {                                                  \
  do {                                                  \
    const char *declname =                              \
    const char *declname =                              \
      IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));  \
      IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));  \
    ASM_OUTPUT_DEF ((FILE), declname,                   \
    ASM_OUTPUT_DEF ((FILE), declname,                   \
                    IDENTIFIER_POINTER (TARGET));       \
                    IDENTIFIER_POINTER (TARGET));       \
    if (! TREE_PUBLIC (DECL))                           \
    if (! TREE_PUBLIC (DECL))                           \
      {                                                 \
      {                                                 \
        fprintf ((FILE), "%s", LOCAL_ASM_OP);           \
        fprintf ((FILE), "%s", LOCAL_ASM_OP);           \
        assemble_name ((FILE), declname);               \
        assemble_name ((FILE), declname);               \
        fprintf ((FILE), "\n");                         \
        fprintf ((FILE), "\n");                         \
      }                                                 \
      }                                                 \
  } while (0)
  } while (0)
 
 
/* Follow Sun requirements for TLS code sequences and use Sun assembler TLS
/* Follow Sun requirements for TLS code sequences and use Sun assembler TLS
   syntax.  */
   syntax.  */
#undef TARGET_SUN_TLS
#undef TARGET_SUN_TLS
#define TARGET_SUN_TLS 1
#define TARGET_SUN_TLS 1
 
 
/* The Sun assembler uses .tcomm for TLS common sections.  */
/* The Sun assembler uses .tcomm for TLS common sections.  */
#define TLS_COMMON_ASM_OP ".tcomm"
#define TLS_COMMON_ASM_OP ".tcomm"
 
 
/* Similar to the Sun assembler on SPARC, the native assembler requires
/* Similar to the Sun assembler on SPARC, the native assembler requires
   TLS objects to be declared as @tls_obj (not @tls_object).  Unlike SPARC,
   TLS objects to be declared as @tls_obj (not @tls_object).  Unlike SPARC,
   gas doesn't understand this variant.  */
   gas doesn't understand this variant.  */
#ifndef USE_GAS
#ifndef USE_GAS
#undef  ASM_DECLARE_OBJECT_NAME
#undef  ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)               \
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)               \
  do                                                            \
  do                                                            \
    {                                                           \
    {                                                           \
      HOST_WIDE_INT size;                                       \
      HOST_WIDE_INT size;                                       \
                                                                \
                                                                \
      if (targetm.have_tls && DECL_THREAD_LOCAL_P (DECL))       \
      if (targetm.have_tls && DECL_THREAD_LOCAL_P (DECL))       \
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "tls_obj");      \
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "tls_obj");      \
      else                                                      \
      else                                                      \
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");       \
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");       \
                                                                \
                                                                \
      size_directive_output = 0;                                \
      size_directive_output = 0;                                \
      if (!flag_inhibit_size_directive                          \
      if (!flag_inhibit_size_directive                          \
          && (DECL) && DECL_SIZE (DECL))                        \
          && (DECL) && DECL_SIZE (DECL))                        \
        {                                                       \
        {                                                       \
          size_directive_output = 1;                            \
          size_directive_output = 1;                            \
          size = int_size_in_bytes (TREE_TYPE (DECL));          \
          size = int_size_in_bytes (TREE_TYPE (DECL));          \
          ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);         \
          ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);         \
        }                                                       \
        }                                                       \
                                                                \
                                                                \
      ASM_OUTPUT_LABEL (FILE, NAME);                            \
      ASM_OUTPUT_LABEL (FILE, NAME);                            \
    }                                                           \
    }                                                           \
  while (0)
  while (0)
#endif
#endif
 
 
/* The Solaris assembler cannot grok .stabd directives.  */
/* The Solaris assembler cannot grok .stabd directives.  */
#undef NO_DBX_BNSYM_ENSYM
#undef NO_DBX_BNSYM_ENSYM
#define NO_DBX_BNSYM_ENSYM 1
#define NO_DBX_BNSYM_ENSYM 1
 
 
/* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
/* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
   the bits from config/sol2.c.  */
   the bits from config/sol2.c.  */
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
 
 
/* Register the Solaris-specific #pragma directives.  */
/* Register the Solaris-specific #pragma directives.  */
#define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas ()
#define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas ()
 
 
#undef SUBTARGET_RETURN_IN_MEMORY
#undef SUBTARGET_RETURN_IN_MEMORY
#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
        ix86_solaris_return_in_memory (TYPE, FNTYPE)
        ix86_solaris_return_in_memory (TYPE, FNTYPE)
 
 
/* Output a simple call for .init/.fini.  */
/* Output a simple call for .init/.fini.  */
#define ASM_OUTPUT_CALL(FILE, FN)                               \
#define ASM_OUTPUT_CALL(FILE, FN)                               \
  do                                                            \
  do                                                            \
    {                                                           \
    {                                                           \
      fprintf (FILE, "\tcall\t");                               \
      fprintf (FILE, "\tcall\t");                               \
      print_operand (FILE, XEXP (DECL_RTL (FN), 0), 'P');       \
      print_operand (FILE, XEXP (DECL_RTL (FN), 0), 'P');       \
      fprintf (FILE, "\n");                                     \
      fprintf (FILE, "\n");                                     \
    }                                                           \
    }                                                           \
  while (0)
  while (0)
 
 
/* We do not need NT_VERSION notes.  */
/* We do not need NT_VERSION notes.  */
#undef X86_FILE_START_VERSION_DIRECTIVE
#undef X86_FILE_START_VERSION_DIRECTIVE
#define X86_FILE_START_VERSION_DIRECTIVE false
#define X86_FILE_START_VERSION_DIRECTIVE false
 
 
/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce
/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce
   sections, so don't use them.  */
   sections, so don't use them.  */
#ifndef TARGET_GNU_LD
#ifndef TARGET_GNU_LD
#define USE_HIDDEN_LINKONCE 0
#define USE_HIDDEN_LINKONCE 0
#endif
#endif
 
 
/* Put all *tf routines in libgcc.  */
/* Put all *tf routines in libgcc.  */
#undef LIBGCC2_HAS_TF_MODE
#undef LIBGCC2_HAS_TF_MODE
#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#define LIBGCC2_TF_CEXT q
#define TF_SIZE 113
#define TF_SIZE 113
 
 
#define MD_UNWIND_SUPPORT "config/i386/sol2-unwind.h"
#define MD_UNWIND_SUPPORT "config/i386/sol2-unwind.h"
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.