OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [sh/] [netbsd-elf.h] - Diff between revs 38 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 154
/* Definitions for SH running NetBSD using ELF
/* Definitions for SH running NetBSD using ELF
   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
   Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
   Contributed by Wasabi Systems, Inc.
   Contributed by Wasabi Systems, Inc.
 
 
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/>.  */
 
 
/* Run-time Target Specification.  */
/* Run-time Target Specification.  */
#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
#define TARGET_VERSION_ENDIAN "le"
#define TARGET_VERSION_ENDIAN "le"
#else
#else
#define TARGET_VERSION_ENDIAN ""
#define TARGET_VERSION_ENDIAN ""
#endif
#endif
 
 
#if TARGET_CPU_DEFAULT & MASK_SH5
#if TARGET_CPU_DEFAULT & MASK_SH5
#if TARGET_CPU_DEFAULT & MASK_SH_E
#if TARGET_CPU_DEFAULT & MASK_SH_E
#define TARGET_VERSION_CPU "sh5"
#define TARGET_VERSION_CPU "sh5"
#else
#else
#define TARGET_VERSION_CPU "sh64"
#define TARGET_VERSION_CPU "sh64"
#endif /* MASK_SH_E */
#endif /* MASK_SH_E */
#else
#else
#define TARGET_VERSION_CPU "sh"
#define TARGET_VERSION_CPU "sh"
#endif /* MASK_SH5 */
#endif /* MASK_SH5 */
 
 
#undef TARGET_VERSION
#undef TARGET_VERSION
#define TARGET_VERSION  fprintf (stderr, " (NetBSD/%s%s ELF)",          \
#define TARGET_VERSION  fprintf (stderr, " (NetBSD/%s%s ELF)",          \
                                 TARGET_VERSION_CPU, TARGET_VERSION_ENDIAN)
                                 TARGET_VERSION_CPU, TARGET_VERSION_ENDIAN)
 
 
 
 
/* Extra specs needed for NetBSD SuperH ELF targets.  */
/* Extra specs needed for NetBSD SuperH ELF targets.  */
 
 
#undef SUBTARGET_EXTRA_SPECS
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS                                           \
#define SUBTARGET_EXTRA_SPECS                                           \
  { "netbsd_entry_point", NETBSD_ENTRY_POINT },
  { "netbsd_entry_point", NETBSD_ENTRY_POINT },
 
 
 
 
#define TARGET_OS_CPP_BUILTINS()                                        \
#define TARGET_OS_CPP_BUILTINS()                                        \
  do                                                                    \
  do                                                                    \
    {                                                                   \
    {                                                                   \
      NETBSD_OS_CPP_BUILTINS_ELF();                                     \
      NETBSD_OS_CPP_BUILTINS_ELF();                                     \
      builtin_define ("__NO_LEADING_UNDERSCORES__");                    \
      builtin_define ("__NO_LEADING_UNDERSCORES__");                    \
    }                                                                   \
    }                                                                   \
  while (0)
  while (0)
 
 
/* Provide a LINK_SPEC appropriate for a NetBSD/sh ELF target.
/* Provide a LINK_SPEC appropriate for a NetBSD/sh ELF target.
   We use the SH_LINK_SPEC from sh/sh.h, and define the appropriate
   We use the SH_LINK_SPEC from sh/sh.h, and define the appropriate
   SUBTARGET_LINK_SPEC that pulls in what we need from a generic
   SUBTARGET_LINK_SPEC that pulls in what we need from a generic
   NetBSD ELF LINK_SPEC.  */
   NetBSD ELF LINK_SPEC.  */
 
 
/* LINK_EMUL_PREFIX from sh/elf.h */
/* LINK_EMUL_PREFIX from sh/elf.h */
 
 
#undef SUBTARGET_LINK_EMUL_SUFFIX
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_nbsd"
#define SUBTARGET_LINK_EMUL_SUFFIX "_nbsd"
 
 
#undef SUBTARGET_LINK_SPEC
#undef SUBTARGET_LINK_SPEC
#define SUBTARGET_LINK_SPEC NETBSD_LINK_SPEC_ELF
#define SUBTARGET_LINK_SPEC NETBSD_LINK_SPEC_ELF
 
 
#undef LINK_SPEC
#undef LINK_SPEC
#define LINK_SPEC SH_LINK_SPEC
#define LINK_SPEC SH_LINK_SPEC
 
 
#define NETBSD_ENTRY_POINT "__start"
#define NETBSD_ENTRY_POINT "__start"
 
 
/* Provide a CPP_SPEC appropriate for NetBSD.  */
/* Provide a CPP_SPEC appropriate for NetBSD.  */
#undef SUBTARGET_CPP_SPEC
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
 
 
#undef TARGET_DEFAULT
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
#define TARGET_DEFAULT \
  (TARGET_CPU_DEFAULT | MASK_USERMODE | TARGET_ENDIAN_DEFAULT)
  (TARGET_CPU_DEFAULT | MASK_USERMODE | TARGET_ENDIAN_DEFAULT)
 
 
/* Define because we use the label and we do not need them.  */
/* Define because we use the label and we do not need them.  */
#define NO_PROFILE_COUNTERS 1
#define NO_PROFILE_COUNTERS 1
 
 
#undef FUNCTION_PROFILER
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(STREAM,LABELNO)                               \
#define FUNCTION_PROFILER(STREAM,LABELNO)                               \
do                                                                      \
do                                                                      \
  {                                                                     \
  {                                                                     \
    if (TARGET_SHMEDIA32 || TARGET_SHMEDIA64)                           \
    if (TARGET_SHMEDIA32 || TARGET_SHMEDIA64)                           \
      {                                                                 \
      {                                                                 \
        /* FIXME */                                                     \
        /* FIXME */                                                     \
        sorry ("unimplemented-shmedia profiling");                      \
        sorry ("unimplemented-shmedia profiling");                      \
      }                                                                 \
      }                                                                 \
    else                                                                \
    else                                                                \
      {                                                                 \
      {                                                                 \
        fprintf((STREAM), "\tmov.l\t%sLP%d,r1\n",                       \
        fprintf((STREAM), "\tmov.l\t%sLP%d,r1\n",                       \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
        fprintf((STREAM), "\tmova\t%sLP%dr,r0\n",                       \
        fprintf((STREAM), "\tmova\t%sLP%dr,r0\n",                       \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
        fprintf((STREAM), "\tjmp\t@r1\n");                              \
        fprintf((STREAM), "\tjmp\t@r1\n");                              \
        fprintf((STREAM), "\tnop\n");                                   \
        fprintf((STREAM), "\tnop\n");                                   \
        fprintf((STREAM), "\t.align\t2\n");                             \
        fprintf((STREAM), "\t.align\t2\n");                             \
        fprintf((STREAM), "%sLP%d:\t.long\t__mcount\n",                 \
        fprintf((STREAM), "%sLP%d:\t.long\t__mcount\n",                 \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
                LOCAL_LABEL_PREFIX, (LABELNO));                         \
        fprintf((STREAM), "%sLP%dr:\n", LOCAL_LABEL_PREFIX, (LABELNO)); \
        fprintf((STREAM), "%sLP%dr:\n", LOCAL_LABEL_PREFIX, (LABELNO)); \
      }                                                                 \
      }                                                                 \
  }                                                                     \
  }                                                                     \
while (0)
while (0)
 
 
/* Since libgcc is compiled with -fpic for this target, we can't use
/* Since libgcc is compiled with -fpic for this target, we can't use
   __sdivsi3_1 as the division strategy for -O0 and -Os.  */
   __sdivsi3_1 as the division strategy for -O0 and -Os.  */
#undef SH_DIV_STRATEGY_DEFAULT
#undef SH_DIV_STRATEGY_DEFAULT
#define SH_DIV_STRATEGY_DEFAULT SH_DIV_CALL2
#define SH_DIV_STRATEGY_DEFAULT SH_DIV_CALL2
#undef SH_DIV_STR_FOR_SIZE
#undef SH_DIV_STR_FOR_SIZE
#define SH_DIV_STR_FOR_SIZE "call2"
#define SH_DIV_STR_FOR_SIZE "call2"
 
 

powered by: WebSVN 2.1.0

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