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/] [arm/] [bpabi.h] - Diff between revs 282 and 384

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

Rev 282 Rev 384
/* Configuration file for ARM BPABI targets.
/* Configuration file for ARM BPABI targets.
   Copyright (C) 2004, 2005, 2007, 2008, 2009
   Copyright (C) 2004, 2005, 2007, 2008, 2009
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Contributed by CodeSourcery, LLC
   Contributed by CodeSourcery, LLC
 
 
   This file is part of GCC.
   This file is part of GCC.
 
 
   GCC is free software; you can redistribute it and/or modify it
   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.
   option) any later version.
 
 
   GCC is distributed in the hope that it will be useful, but WITHOUT
   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.
   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/>.  */
 
 
/* Use the AAPCS ABI by default.  */
/* Use the AAPCS ABI by default.  */
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS
 
 
/* Assume that AAPCS ABIs should adhere to the full BPABI.  */
/* Assume that AAPCS ABIs should adhere to the full BPABI.  */
#define TARGET_BPABI (TARGET_AAPCS_BASED)
#define TARGET_BPABI (TARGET_AAPCS_BASED)
 
 
/* BPABI targets use EABI frame unwinding tables.  */
/* BPABI targets use EABI frame unwinding tables.  */
#define TARGET_UNWIND_INFO 1
#define TARGET_UNWIND_INFO 1
 
 
/* Section 4.1 of the AAPCS requires the use of VFP format.  */
/* Section 4.1 of the AAPCS requires the use of VFP format.  */
#undef  FPUTYPE_DEFAULT
#undef  FPUTYPE_DEFAULT
#define FPUTYPE_DEFAULT "vfp"
#define FPUTYPE_DEFAULT "vfp"
 
 
/* TARGET_BIG_ENDIAN_DEFAULT is set in
/* TARGET_BIG_ENDIAN_DEFAULT is set in
   config.gcc for big endian configurations.  */
   config.gcc for big endian configurations.  */
#if TARGET_BIG_ENDIAN_DEFAULT
#if TARGET_BIG_ENDIAN_DEFAULT
#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
#else
#else
#define TARGET_ENDIAN_DEFAULT 0
#define TARGET_ENDIAN_DEFAULT 0
#endif
#endif
 
 
/* EABI targets should enable interworking by default.  */
/* EABI targets should enable interworking by default.  */
#undef  TARGET_DEFAULT
#undef  TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
 
 
/* The ARM BPABI functions return a boolean; they use no special
/* The ARM BPABI functions return a boolean; they use no special
   calling convention.  */
   calling convention.  */
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
 
 
/* The BPABI integer comparison routines return { -1, 0, 1 }.  */
/* The BPABI integer comparison routines return { -1, 0, 1 }.  */
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
 
 
#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4:--fix-v4bx}"
#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4:--fix-v4bx}"
 
 
#define BE8_LINK_SPEC " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5|mcpu=cortex-a8|mcpu=cortex-a9:%{!r:--be8}}}"
#define BE8_LINK_SPEC " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5|mcpu=cortex-a8|mcpu=cortex-a9:%{!r:--be8}}}"
 
 
/* Tell the assembler to build BPABI binaries.  */
/* Tell the assembler to build BPABI binaries.  */
#undef  SUBTARGET_EXTRA_ASM_SPEC
#undef  SUBTARGET_EXTRA_ASM_SPEC
#define SUBTARGET_EXTRA_ASM_SPEC "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC
#define SUBTARGET_EXTRA_ASM_SPEC "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC
 
 
#ifndef SUBTARGET_EXTRA_LINK_SPEC
#ifndef SUBTARGET_EXTRA_LINK_SPEC
#define SUBTARGET_EXTRA_LINK_SPEC ""
#define SUBTARGET_EXTRA_LINK_SPEC ""
#endif
#endif
 
 
/* The generic link spec in elf.h does not support shared libraries.  */
/* The generic link spec in elf.h does not support shared libraries.  */
#define BPABI_LINK_SPEC \
#define BPABI_LINK_SPEC \
  "%{mbig-endian:-EB} %{mlittle-endian:-EL} "           \
  "%{mbig-endian:-EB} %{mlittle-endian:-EL} "           \
  "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} "        \
  "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} "        \
  "-X" SUBTARGET_EXTRA_LINK_SPEC TARGET_FIX_V4BX_SPEC BE8_LINK_SPEC
  "-X" SUBTARGET_EXTRA_LINK_SPEC TARGET_FIX_V4BX_SPEC BE8_LINK_SPEC
 
 
#undef  LINK_SPEC
#undef  LINK_SPEC
#define LINK_SPEC BPABI_LINK_SPEC
#define LINK_SPEC BPABI_LINK_SPEC
 
 
#if defined (__thumb__)
#if defined (__thumb__)
#define RENAME_LIBRARY_SET ".thumb_set"
#define RENAME_LIBRARY_SET ".thumb_set"
#else
#else
#define RENAME_LIBRARY_SET ".set"
#define RENAME_LIBRARY_SET ".set"
#endif
#endif
 
 
/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME.  */
/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME.  */
#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME)            \
#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME)            \
  __asm__ (".globl\t__aeabi_" #AEABI_NAME "\n"          \
  __asm__ (".globl\t__aeabi_" #AEABI_NAME "\n"          \
           RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME  \
           RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME  \
             ", __" #GCC_NAME "\n");
             ", __" #GCC_NAME "\n");
 
 
/* Give some libgcc functions an additional __aeabi name.  */
/* Give some libgcc functions an additional __aeabi name.  */
#ifdef L_muldi3
#ifdef L_muldi3
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
#endif
#endif
#ifdef L_muldi3
#ifdef L_muldi3
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
#endif
#endif
#ifdef L_fixdfdi
#ifdef L_fixdfdi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz) \
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz) \
  extern DWtype __fixdfdi (DFtype) __attribute__((pcs("aapcs"))); \
  extern DWtype __fixdfdi (DFtype) __attribute__((pcs("aapcs"))); \
  extern UDWtype __fixunsdfdi (DFtype) __asm__("__aeabi_d2ulz") __attribute__((pcs("aapcs")));
  extern UDWtype __fixunsdfdi (DFtype) __asm__("__aeabi_d2ulz") __attribute__((pcs("aapcs")));
#endif
#endif
#ifdef L_fixunsdfdi
#ifdef L_fixunsdfdi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz) \
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz) \
  extern UDWtype __fixunsdfdi (DFtype) __attribute__((pcs("aapcs")));
  extern UDWtype __fixunsdfdi (DFtype) __attribute__((pcs("aapcs")));
#endif
#endif
#ifdef L_fixsfdi
#ifdef L_fixsfdi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz) \
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz) \
  extern DWtype __fixsfdi (SFtype) __attribute__((pcs("aapcs"))); \
  extern DWtype __fixsfdi (SFtype) __attribute__((pcs("aapcs"))); \
  extern UDWtype __fixunssfdi (SFtype) __asm__("__aeabi_f2ulz") __attribute__((pcs("aapcs")));
  extern UDWtype __fixunssfdi (SFtype) __asm__("__aeabi_f2ulz") __attribute__((pcs("aapcs")));
#endif
#endif
#ifdef L_fixunssfdi
#ifdef L_fixunssfdi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz) \
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz) \
  extern UDWtype __fixunssfdi (SFtype) __attribute__((pcs("aapcs")));
  extern UDWtype __fixunssfdi (SFtype) __attribute__((pcs("aapcs")));
#endif
#endif
#ifdef L_floatdidf
#ifdef L_floatdidf
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
#endif
#endif
#ifdef L_floatdisf
#ifdef L_floatdisf
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
#endif
#endif
 
 
/* These renames are needed on ARMv6M.  Other targets get them from
/* These renames are needed on ARMv6M.  Other targets get them from
   assembly routines.  */
   assembly routines.  */
#ifdef L_fixunsdfsi
#ifdef L_fixunsdfsi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, d2uiz)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, d2uiz)
#endif
#endif
#ifdef L_fixunssfsi
#ifdef L_fixunssfsi
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, f2uiz)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, f2uiz)
#endif
#endif
#ifdef L_floatundidf
#ifdef L_floatundidf
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundidf, ul2d)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundidf, ul2d)
#endif
#endif
#ifdef L_floatundisf
#ifdef L_floatundisf
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, ul2f)
#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, ul2f)
#endif
#endif
 
 
/* The BPABI requires that we always use an out-of-line implementation
/* The BPABI requires that we always use an out-of-line implementation
   of RTTI comparison, even if the target supports weak symbols,
   of RTTI comparison, even if the target supports weak symbols,
   because the same object file might be used on a target that does
   because the same object file might be used on a target that does
   not support merging symbols across DLL boundaries.  This macro is
   not support merging symbols across DLL boundaries.  This macro is
   broken out separately so that it can be used within
   broken out separately so that it can be used within
   TARGET_OS_CPP_BUILTINS in configuration files for systems based on
   TARGET_OS_CPP_BUILTINS in configuration files for systems based on
   the BPABI.  */
   the BPABI.  */
#define TARGET_BPABI_CPP_BUILTINS()                     \
#define TARGET_BPABI_CPP_BUILTINS()                     \
  do                                                    \
  do                                                    \
    {                                                   \
    {                                                   \
      builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0");      \
      builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0");      \
    }                                                   \
    }                                                   \
  while (false)
  while (false)
 
 
#undef TARGET_OS_CPP_BUILTINS
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
#define TARGET_OS_CPP_BUILTINS() \
  TARGET_BPABI_CPP_BUILTINS()
  TARGET_BPABI_CPP_BUILTINS()
 
 
/* The BPABI specifies the use of .{init,fini}_array.  Therefore, we
/* The BPABI specifies the use of .{init,fini}_array.  Therefore, we
   do not want GCC to put anything into the .{init,fini} sections.  */
   do not want GCC to put anything into the .{init,fini} sections.  */
#undef INIT_SECTION_ASM_OP
#undef INIT_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
 
 
/* The legacy _mcount implementation assumes r11 points to a
/* The legacy _mcount implementation assumes r11 points to a
    4-word APCS frame.  This is generally not true for EABI targets,
    4-word APCS frame.  This is generally not true for EABI targets,
    particularly not in Thumb mode.  We assume the mcount
    particularly not in Thumb mode.  We assume the mcount
    implementation does not require a counter variable (No Counter).
    implementation does not require a counter variable (No Counter).
    Note that __gnu_mcount_nc will be entered with a misaligned stack.
    Note that __gnu_mcount_nc will be entered with a misaligned stack.
    This is OK because it uses a special calling convention anyway.  */
    This is OK because it uses a special calling convention anyway.  */
 
 
#undef  NO_PROFILE_COUNTERS
#undef  NO_PROFILE_COUNTERS
#define NO_PROFILE_COUNTERS 1
#define NO_PROFILE_COUNTERS 1
#undef  ARM_FUNCTION_PROFILER
#undef  ARM_FUNCTION_PROFILER
#define ARM_FUNCTION_PROFILER(STREAM, LABELNO)                          \
#define ARM_FUNCTION_PROFILER(STREAM, LABELNO)                          \
{                                                                       \
{                                                                       \
  fprintf (STREAM, "\tpush\t{lr}\n");                                   \
  fprintf (STREAM, "\tpush\t{lr}\n");                                   \
  fprintf (STREAM, "\tbl\t__gnu_mcount_nc\n");                          \
  fprintf (STREAM, "\tbl\t__gnu_mcount_nc\n");                          \
}
}
 
 
#undef SUBTARGET_FRAME_POINTER_REQUIRED
#undef SUBTARGET_FRAME_POINTER_REQUIRED
#define SUBTARGET_FRAME_POINTER_REQUIRED 0
#define SUBTARGET_FRAME_POINTER_REQUIRED 0
 
 
/* __gnu_mcount_nc restores the original LR value before returning.  Ensure
/* __gnu_mcount_nc restores the original LR value before returning.  Ensure
   that there is no unnecessary hook set up.  */
   that there is no unnecessary hook set up.  */
#undef PROFILE_HOOK
#undef PROFILE_HOOK
 
 

powered by: WebSVN 2.1.0

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