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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [sparc/] [sysv4.h] - Diff between revs 38 and 154

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

Rev 38 Rev 154
/* Target definitions for GNU compiler for SPARC running System V.4
/* Target definitions for GNU compiler for SPARC running System V.4
   Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998, 2000, 2002, 2007
   Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998, 2000, 2002, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Contributed by Ron Guilmette (rfg@monkeys.com).
   Contributed by Ron Guilmette (rfg@monkeys.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/>.  */
 
 
#ifndef TARGET_VERSION
#ifndef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparc ELF)"); 
#define TARGET_VERSION fprintf (stderr, " (sparc ELF)"); 
#endif
#endif
 
 
/* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h.
/* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h.
   Why, exactly, is svr4.h messing with this?  Seems like the chip
   Why, exactly, is svr4.h messing with this?  Seems like the chip
   would know best.  */
   would know best.  */
 
 
#undef SIZE_TYPE
#undef SIZE_TYPE
#define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int")
#define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int")
 
 
#undef PTRDIFF_TYPE
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
#define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
 
 
/* Undefined some symbols which are defined in "svr4.h" but which are
/* Undefined some symbols which are defined in "svr4.h" but which are
   appropriate only for typical svr4 systems, but not for the specific
   appropriate only for typical svr4 systems, but not for the specific
   case of svr4 running on a SPARC.  */
   case of svr4 running on a SPARC.  */
 
 
#undef INIT_SECTION_ASM_OP
#undef INIT_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#undef READONLY_DATA_SECTION_ASM_OP
#undef READONLY_DATA_SECTION_ASM_OP
#undef TYPE_OPERAND_FMT
#undef TYPE_OPERAND_FMT
#undef PUSHSECTION_FORMAT
#undef PUSHSECTION_FORMAT
#undef STRING_ASM_OP
#undef STRING_ASM_OP
#undef COMMON_ASM_OP
#undef COMMON_ASM_OP
#undef SKIP_ASM_OP
#undef SKIP_ASM_OP
#undef SET_ASM_OP       /* Has no equivalent.  See ASM_OUTPUT_DEF below.  */
#undef SET_ASM_OP       /* Has no equivalent.  See ASM_OUTPUT_DEF below.  */
 
 
/* The native assembler can't compute differences between symbols in different
/* The native assembler can't compute differences between symbols in different
   sections when generating pic code, so we must put jump tables in the
   sections when generating pic code, so we must put jump tables in the
   text section.  */
   text section.  */
/* But we now defer the tables to the end of the function, so we make
/* But we now defer the tables to the end of the function, so we make
   this 0 to not confuse the branch shortening code.  */
   this 0 to not confuse the branch shortening code.  */
#define JUMP_TABLES_IN_TEXT_SECTION 0
#define JUMP_TABLES_IN_TEXT_SECTION 0
 
 
/* Pass -K to the assembler when PIC.  */
/* Pass -K to the assembler when PIC.  */
#undef ASM_SPEC
#undef ASM_SPEC
#define ASM_SPEC \
#define ASM_SPEC \
  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
   %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
   %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
 
 
/* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
/* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
   Note that many of these are different from the typical pseudo-ops used
   Note that many of these are different from the typical pseudo-ops used
   by most svr4 assemblers.  That is probably due to a (misguided?) attempt
   by most svr4 assemblers.  That is probably due to a (misguided?) attempt
   to keep the SPARC/svr4 assembler somewhat compatible with the SPARC/SunOS
   to keep the SPARC/svr4 assembler somewhat compatible with the SPARC/SunOS
   assembler.  */
   assembler.  */
 
 
#define STRING_ASM_OP           "\t.asciz\t"
#define STRING_ASM_OP           "\t.asciz\t"
#define COMMON_ASM_OP           "\t.common\t"
#define COMMON_ASM_OP           "\t.common\t"
#define SKIP_ASM_OP             "\t.skip\t"
#define SKIP_ASM_OP             "\t.skip\t"
#define PUSHSECTION_ASM_OP      "\t.pushsection\t"
#define PUSHSECTION_ASM_OP      "\t.pushsection\t"
#define POPSECTION_ASM_OP       "\t.popsection"
#define POPSECTION_ASM_OP       "\t.popsection"
 
 
/* This is the format used to print the second operand of a .type pseudo-op
/* This is the format used to print the second operand of a .type pseudo-op
   for the SPARC/svr4 assembler.  */
   for the SPARC/svr4 assembler.  */
 
 
#define TYPE_OPERAND_FMT      "#%s"
#define TYPE_OPERAND_FMT      "#%s"
 
 
/* This is the format used to print a .pushsection pseudo-op (and its operand)
/* This is the format used to print a .pushsection pseudo-op (and its operand)
   for the SPARC/svr4 assembler.  */
   for the SPARC/svr4 assembler.  */
 
 
#define PUSHSECTION_FORMAT      "%s\"%s\"\n"
#define PUSHSECTION_FORMAT      "%s\"%s\"\n"
 
 
#undef ASM_OUTPUT_CASE_LABEL
#undef ASM_OUTPUT_CASE_LABEL
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE)             \
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE)             \
do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3);                \
do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3);                \
     (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM);           \
     (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM);           \
   } while (0)
   } while (0)
 
 
/* This is how to equate one symbol to another symbol.  The syntax used is
/* This is how to equate one symbol to another symbol.  The syntax used is
   `SYM1=SYM2'.  Note that this is different from the way equates are done
   `SYM1=SYM2'.  Note that this is different from the way equates are done
   with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
   with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
 
 
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
 do {   fprintf ((FILE), "\t");                                         \
 do {   fprintf ((FILE), "\t");                                         \
        assemble_name (FILE, LABEL1);                                   \
        assemble_name (FILE, LABEL1);                                   \
        fprintf (FILE, " = ");                                          \
        fprintf (FILE, " = ");                                          \
        assemble_name (FILE, LABEL2);                                   \
        assemble_name (FILE, LABEL2);                                   \
        fprintf (FILE, "\n");                                           \
        fprintf (FILE, "\n");                                           \
  } while (0)
  } while (0)
 
 
/* Define how the SPARC registers should be numbered for Dwarf output.
/* Define how the SPARC registers should be numbered for Dwarf output.
   The numbering provided here should be compatible with the native
   The numbering provided here should be compatible with the native
   svr4 SDB debugger in the SPARC/svr4 reference port.  The numbering
   svr4 SDB debugger in the SPARC/svr4 reference port.  The numbering
   is as follows:
   is as follows:
 
 
   Assembly name        gcc internal regno      Dwarf regno
   Assembly name        gcc internal regno      Dwarf regno
   ----------------------------------------------------------
   ----------------------------------------------------------
   g0-g7                0-7                     0-7
   g0-g7                0-7                     0-7
   o0-o7                8-15                    8-15
   o0-o7                8-15                    8-15
   l0-l7                16-23                   16-23
   l0-l7                16-23                   16-23
   i0-i7                24-31                   24-31
   i0-i7                24-31                   24-31
   f0-f31               32-63                   40-71
   f0-f31               32-63                   40-71
*/
*/
 
 
#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 32 ? (REGNO) : (REGNO) + 8)
#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 32 ? (REGNO) : (REGNO) + 8)
 
 
/* A set of symbol definitions for assembly pseudo-ops which will
/* A set of symbol definitions for assembly pseudo-ops which will
   get us switched to various sections of interest.  These are used
   get us switched to various sections of interest.  These are used
   in all places where we simply want to switch to a section, and
   in all places where we simply want to switch to a section, and
   *not* to push the previous section name onto the assembler's
   *not* to push the previous section name onto the assembler's
   section names stack (as we do often in dwarfout.c).  */
   section names stack (as we do often in dwarfout.c).  */
 
 
#define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
#define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
#define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
#define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
#define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
#define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t\".rodata\""
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t\".rodata\""
#define INIT_SECTION_ASM_OP     "\t.section\t\".init\""
#define INIT_SECTION_ASM_OP     "\t.section\t\".init\""
#define FINI_SECTION_ASM_OP     "\t.section\t\".fini\""
#define FINI_SECTION_ASM_OP     "\t.section\t\".fini\""
 
 
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
 
 
   Note that we want to give these sections the SHF_WRITE attribute
   Note that we want to give these sections the SHF_WRITE attribute
   because these sections will actually contain data (i.e. tables of
   because these sections will actually contain data (i.e. tables of
   addresses of functions in the current root executable or shared library
   addresses of functions in the current root executable or shared library
   file) and, in the case of a shared library, the relocatable addresses
   file) and, in the case of a shared library, the relocatable addresses
   will have to be properly resolved/relocated (and then written into) by
   will have to be properly resolved/relocated (and then written into) by
   the dynamic linker when it actually attaches the given shared library
   the dynamic linker when it actually attaches the given shared library
   to the executing process.  (Note that on SVR4, you may wish to use the
   to the executing process.  (Note that on SVR4, you may wish to use the
   `-z text' option to the ELF linker, when building a shared library, as
   `-z text' option to the ELF linker, when building a shared library, as
   an additional check that you are doing everything right.  But if you do
   an additional check that you are doing everything right.  But if you do
   use the `-z text' option when building a shared library, you will get
   use the `-z text' option when building a shared library, you will get
   errors unless the .ctors and .dtors sections are marked as writable
   errors unless the .ctors and .dtors sections are marked as writable
   via the SHF_WRITE attribute.)  */
   via the SHF_WRITE attribute.)  */
 
 
#undef CTORS_SECTION_ASM_OP
#undef CTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP    "\t.section\t\".ctors\",#alloc,#write"
#define CTORS_SECTION_ASM_OP    "\t.section\t\".ctors\",#alloc,#write"
#undef DTORS_SECTION_ASM_OP
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP    "\t.section\t\".dtors\",#alloc,#write"
#define DTORS_SECTION_ASM_OP    "\t.section\t\".dtors\",#alloc,#write"
 
 
/* Switch into a generic section.  */
/* Switch into a generic section.  */
#undef TARGET_ASM_NAMED_SECTION
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION  sparc_elf_asm_named_section
#define TARGET_ASM_NAMED_SECTION  sparc_elf_asm_named_section
 
 
#undef ASM_OUTPUT_ALIGNED_BSS
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
 
 
/* Override the name of the mcount profiling function.  */
/* Override the name of the mcount profiling function.  */
 
 
#undef MCOUNT_FUNCTION
#undef MCOUNT_FUNCTION
#define MCOUNT_FUNCTION "*_mcount"
#define MCOUNT_FUNCTION "*_mcount"
 
 

powered by: WebSVN 2.1.0

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