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/] [rs6000/] [aix.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 of target machine for GNU compiler,
/* Definitions of target machine for GNU compiler,
   for IBM RS/6000 POWER running AIX.
   for IBM RS/6000 POWER running AIX.
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
   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/>.  */
 
 
/* Yes!  We are AIX!  */
/* Yes!  We are AIX!  */
#define DEFAULT_ABI ABI_AIX
#define DEFAULT_ABI ABI_AIX
#undef  TARGET_AIX
#undef  TARGET_AIX
#define TARGET_AIX 1
#define TARGET_AIX 1
 
 
/* AIX always has a TOC.  */
/* AIX always has a TOC.  */
#define TARGET_NO_TOC 0
#define TARGET_NO_TOC 0
#define TARGET_TOC 1
#define TARGET_TOC 1
#define FIXED_R2 1
#define FIXED_R2 1
 
 
/* AIX allows r13 to be used in 32-bit mode.  */
/* AIX allows r13 to be used in 32-bit mode.  */
#define FIXED_R13 0
#define FIXED_R13 0
 
 
/* 32-bit and 64-bit AIX stack boundary is 128.  */
/* 32-bit and 64-bit AIX stack boundary is 128.  */
#undef  STACK_BOUNDARY
#undef  STACK_BOUNDARY
#define STACK_BOUNDARY 128
#define STACK_BOUNDARY 128
 
 
/* AIX does not support Altivec.  */
/* AIX does not support Altivec.  */
#undef  TARGET_ALTIVEC
#undef  TARGET_ALTIVEC
#define TARGET_ALTIVEC 0
#define TARGET_ALTIVEC 0
#undef  TARGET_ALTIVEC_ABI
#undef  TARGET_ALTIVEC_ABI
#define TARGET_ALTIVEC_ABI 0
#define TARGET_ALTIVEC_ABI 0
#undef  TARGET_IEEEQUAD
#undef  TARGET_IEEEQUAD
#define TARGET_IEEEQUAD 0
#define TARGET_IEEEQUAD 0
 
 
/* The AIX linker will discard static constructors in object files before
/* The AIX linker will discard static constructors in object files before
   collect has a chance to see them, so scan the object files directly.  */
   collect has a chance to see them, so scan the object files directly.  */
#define COLLECT_EXPORT_LIST
#define COLLECT_EXPORT_LIST
 
 
/* Handle #pragma weak and #pragma pack.  */
/* Handle #pragma weak and #pragma pack.  */
#define HANDLE_SYSV_PRAGMA 1
#define HANDLE_SYSV_PRAGMA 1
 
 
/* This is the only version of nm that collect2 can work with.  */
/* This is the only version of nm that collect2 can work with.  */
#define REAL_NM_FILE_NAME "/usr/ucb/nm"
#define REAL_NM_FILE_NAME "/usr/ucb/nm"
 
 
#define USER_LABEL_PREFIX  ""
#define USER_LABEL_PREFIX  ""
 
 
/* Don't turn -B into -L if the argument specifies a relative file name.  */
/* Don't turn -B into -L if the argument specifies a relative file name.  */
#define RELATIVE_PREFIX_NOT_LINKDIR
#define RELATIVE_PREFIX_NOT_LINKDIR
 
 
/* Because of the above, we must have gcc search itself to find libgcc.a.  */
/* Because of the above, we must have gcc search itself to find libgcc.a.  */
#define LINK_LIBGCC_SPECIAL_1
#define LINK_LIBGCC_SPECIAL_1
 
 
#define MFWRAP_SPEC " %{static: %{fmudflap|fmudflapth: \
#define MFWRAP_SPEC " %{static: %{fmudflap|fmudflapth: \
 -brename:malloc,__wrap_malloc -brename:__real_malloc,malloc \
 -brename:malloc,__wrap_malloc -brename:__real_malloc,malloc \
 -brename:free,__wrap_free -brename:__real_free,free \
 -brename:free,__wrap_free -brename:__real_free,free \
 -brename:calloc,__wrap_calloc -brename:__real_calloc,calloc \
 -brename:calloc,__wrap_calloc -brename:__real_calloc,calloc \
 -brename:realloc,__wrap_realloc -brename:__real_realloc,realloc \
 -brename:realloc,__wrap_realloc -brename:__real_realloc,realloc \
 -brename:mmap,__wrap_mmap -brename:__real_mmap,mmap \
 -brename:mmap,__wrap_mmap -brename:__real_mmap,mmap \
 -brename:munmap,__wrap_munmap -brename:__real_munmap,munmap \
 -brename:munmap,__wrap_munmap -brename:__real_munmap,munmap \
 -brename:alloca,__wrap_alloca -brename:__real_alloca,alloca \
 -brename:alloca,__wrap_alloca -brename:__real_alloca,alloca \
} %{fmudflapth: \
} %{fmudflapth: \
 -brename:pthread_create,__wrap_pthread_create \
 -brename:pthread_create,__wrap_pthread_create \
 -brename:__real_pthread_create,pthread_create \
 -brename:__real_pthread_create,pthread_create \
 -brename:pthread_join,__wrap_pthread_join \
 -brename:pthread_join,__wrap_pthread_join \
 -brename:__real_pthread_join,pthread_join \
 -brename:__real_pthread_join,pthread_join \
 -brename:pthread_exit,__wrap_pthread_exit \
 -brename:pthread_exit,__wrap_pthread_exit \
 -brename:__real_pthread_exit,pthread_exit \
 -brename:__real_pthread_exit,pthread_exit \
}} %{fmudflap|fmudflapth: \
}} %{fmudflap|fmudflapth: \
 -brename:main,__wrap_main -brename:__real_main,main \
 -brename:main,__wrap_main -brename:__real_main,main \
}"
}"
 
 
#define MFLIB_SPEC " %{fmudflap: -lmudflap \
#define MFLIB_SPEC " %{fmudflap: -lmudflap \
 %{static:%(link_gcc_c_sequence) -lmudflap}} \
 %{static:%(link_gcc_c_sequence) -lmudflap}} \
 %{fmudflapth: -lmudflapth -lpthread \
 %{fmudflapth: -lmudflapth -lpthread \
 %{static:%(link_gcc_c_sequence) -lmudflapth}} "
 %{static:%(link_gcc_c_sequence) -lmudflapth}} "
 
 
/* Names to predefine in the preprocessor for this target machine.  */
/* Names to predefine in the preprocessor for this target machine.  */
#define TARGET_OS_AIX_CPP_BUILTINS()            \
#define TARGET_OS_AIX_CPP_BUILTINS()            \
  do                                            \
  do                                            \
    {                                           \
    {                                           \
      builtin_define ("_IBMR2");                \
      builtin_define ("_IBMR2");                \
      builtin_define ("_POWER");                \
      builtin_define ("_POWER");                \
      builtin_define ("_AIX");                  \
      builtin_define ("_AIX");                  \
      builtin_define ("_AIX32");                \
      builtin_define ("_AIX32");                \
      builtin_define ("_AIX41");                \
      builtin_define ("_AIX41");                \
      builtin_define ("_LONG_LONG");            \
      builtin_define ("_LONG_LONG");            \
      if (TARGET_LONG_DOUBLE_128)               \
      if (TARGET_LONG_DOUBLE_128)               \
        builtin_define ("__LONGDOUBLE128");     \
        builtin_define ("__LONGDOUBLE128");     \
      builtin_assert ("system=unix");           \
      builtin_assert ("system=unix");           \
      builtin_assert ("system=aix");            \
      builtin_assert ("system=aix");            \
    }                                           \
    }                                           \
  while (0)
  while (0)
 
 
/* Define appropriate architecture macros for preprocessor depending on
/* Define appropriate architecture macros for preprocessor depending on
   target switches.  */
   target switches.  */
 
 
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
   %{ansi: -D_ANSI_C_SOURCE}"
   %{ansi: -D_ANSI_C_SOURCE}"
 
 
#undef ASM_DEFAULT_SPEC
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC ""
#define ASM_DEFAULT_SPEC ""
 
 
/* Tell the assembler to assume that all undefined names are external.
/* Tell the assembler to assume that all undefined names are external.
 
 
   Don't do this until the fixed IBM assembler is more generally available.
   Don't do this until the fixed IBM assembler is more generally available.
   When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL,
   When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL,
   ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
   ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
   longer be needed.  Also, the extern declaration of mcount in
   longer be needed.  Also, the extern declaration of mcount in
   rs6000_xcoff_file_start will no longer be needed.  */
   rs6000_xcoff_file_start will no longer be needed.  */
 
 
/* #define ASM_SPEC "-u %(asm_cpu)" */
/* #define ASM_SPEC "-u %(asm_cpu)" */
 
 
/* Default location of syscalls.exp under AIX */
/* Default location of syscalls.exp under AIX */
#ifndef CROSS_COMPILE
#ifndef CROSS_COMPILE
#define LINK_SYSCALLS_SPEC "-bI:/lib/syscalls.exp"
#define LINK_SYSCALLS_SPEC "-bI:/lib/syscalls.exp"
#else
#else
#define LINK_SYSCALLS_SPEC ""
#define LINK_SYSCALLS_SPEC ""
#endif
#endif
 
 
/* Default location of libg.exp under AIX */
/* Default location of libg.exp under AIX */
#ifndef CROSS_COMPILE
#ifndef CROSS_COMPILE
#define LINK_LIBG_SPEC "-bexport:/usr/lib/libg.exp"
#define LINK_LIBG_SPEC "-bexport:/usr/lib/libg.exp"
#else
#else
#define LINK_LIBG_SPEC ""
#define LINK_LIBG_SPEC ""
#endif
#endif
 
 
/* Define the options for the binder: Start text at 512, align all segments
/* Define the options for the binder: Start text at 512, align all segments
   to 512 bytes, and warn if there is text relocation.
   to 512 bytes, and warn if there is text relocation.
 
 
   The -bhalt:4 option supposedly changes the level at which ld will abort,
   The -bhalt:4 option supposedly changes the level at which ld will abort,
   but it also suppresses warnings about multiply defined symbols and is
   but it also suppresses warnings about multiply defined symbols and is
   used by the AIX cc command.  So we use it here.
   used by the AIX cc command.  So we use it here.
 
 
   -bnodelcsect undoes a poor choice of default relating to multiply-defined
   -bnodelcsect undoes a poor choice of default relating to multiply-defined
   csects.  See AIX documentation for more information about this.
   csects.  See AIX documentation for more information about this.
 
 
   -bM:SRE tells the linker that the output file is Shared REusable.  Note
   -bM:SRE tells the linker that the output file is Shared REusable.  Note
   that to actually build a shared library you will also need to specify an
   that to actually build a shared library you will also need to specify an
   export list with the -Wl,-bE option.  */
   export list with the -Wl,-bE option.  */
 
 
#define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
#define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
%{static:-bnso %(link_syscalls) } \
%{static:-bnso %(link_syscalls) } \
%{!shared:%{g*: %(link_libg) }} %{shared:-bM:SRE}"
%{!shared:%{g*: %(link_libg) }} %{shared:-bM:SRE}"
 
 
/* Profiled library versions are used by linking with special directories.  */
/* Profiled library versions are used by linking with special directories.  */
#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
%{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc"
%{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc"
 
 
/* This now supports a natural alignment mode.  */
/* This now supports a natural alignment mode.  */
/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
/* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
  (TARGET_ALIGN_NATURAL ? (COMPUTED) : \
  (TARGET_ALIGN_NATURAL ? (COMPUTED) : \
  (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
  (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
              ? get_inner_array_type (FIELD) \
              ? get_inner_array_type (FIELD) \
              : TREE_TYPE (FIELD)) == DFmode \
              : TREE_TYPE (FIELD)) == DFmode \
   ? MIN ((COMPUTED), 32) : (COMPUTED)))
   ? MIN ((COMPUTED), 32) : (COMPUTED)))
 
 
/* AIX increases natural record alignment to doubleword if the first
/* AIX increases natural record alignment to doubleword if the first
   field is an FP double while the FP fields remain word aligned.  */
   field is an FP double while the FP fields remain word aligned.  */
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                   \
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                   \
  ((TREE_CODE (STRUCT) == RECORD_TYPE                                   \
  ((TREE_CODE (STRUCT) == RECORD_TYPE                                   \
    || TREE_CODE (STRUCT) == UNION_TYPE                                 \
    || TREE_CODE (STRUCT) == UNION_TYPE                                 \
    || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                           \
    || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                           \
   && TARGET_ALIGN_NATURAL == 0                                         \
   && TARGET_ALIGN_NATURAL == 0                                         \
   ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)      \
   ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)      \
   : MAX ((COMPUTED), (SPECIFIED)))
   : MAX ((COMPUTED), (SPECIFIED)))
 
 
/* The AIX ABI isn't explicit on whether aggregates smaller than a
/* The AIX ABI isn't explicit on whether aggregates smaller than a
   word/doubleword should be padded upward or downward.  One could
   word/doubleword should be padded upward or downward.  One could
   reasonably assume that they follow the normal rules for structure
   reasonably assume that they follow the normal rules for structure
   layout treating the parameter area as any other block of memory,
   layout treating the parameter area as any other block of memory,
   then map the reg param area to registers, i.e., pad upward, which
   then map the reg param area to registers, i.e., pad upward, which
   is the way IBM Compilers for AIX behave.
   is the way IBM Compilers for AIX behave.
   Setting both of the following defines results in this behavior.  */
   Setting both of the following defines results in this behavior.  */
#define AGGREGATE_PADDING_FIXED 1
#define AGGREGATE_PADDING_FIXED 1
#define AGGREGATES_PAD_UPWARD_ALWAYS 1
#define AGGREGATES_PAD_UPWARD_ALWAYS 1
 
 
/* Specify padding for the last element of a block move between
/* Specify padding for the last element of a block move between
   registers and memory.  FIRST is nonzero if this is the only
   registers and memory.  FIRST is nonzero if this is the only
   element.  */
   element.  */
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
  (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
  (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
 
 
/* Indicate that jump tables go in the text section.  */
/* Indicate that jump tables go in the text section.  */
 
 
#define JUMP_TABLES_IN_TEXT_SECTION 1
#define JUMP_TABLES_IN_TEXT_SECTION 1
 
 
/* Define any extra SPECS that the compiler needs to generate.  */
/* Define any extra SPECS that the compiler needs to generate.  */
#undef  SUBTARGET_EXTRA_SPECS
#undef  SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS                                           \
#define SUBTARGET_EXTRA_SPECS                                           \
  { "link_syscalls",            LINK_SYSCALLS_SPEC },                   \
  { "link_syscalls",            LINK_SYSCALLS_SPEC },                   \
  { "link_libg",                LINK_LIBG_SPEC }
  { "link_libg",                LINK_LIBG_SPEC }
 
 
/* Define cutoff for using external functions to save floating point.  */
/* Define cutoff for using external functions to save floating point.  */
#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) == 62 || (FIRST_REG) == 63)
#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) == 62 || (FIRST_REG) == 63)
 
 
/* __throw will restore its own return address to be the same as the
/* __throw will restore its own return address to be the same as the
   return address of the function that the throw is being made to.
   return address of the function that the throw is being made to.
   This is unfortunate, because we want to check the original
   This is unfortunate, because we want to check the original
   return address to see if we need to restore the TOC.
   return address to see if we need to restore the TOC.
   So we have to squirrel it away with this.  */
   So we have to squirrel it away with this.  */
#define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init ()
#define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init ()
 
 
/* If the current unwind info (FS) does not contain explicit info
/* If the current unwind info (FS) does not contain explicit info
   saving R2, then we have to do a minor amount of code reading to
   saving R2, then we have to do a minor amount of code reading to
   figure out if it was saved.  The big problem here is that the
   figure out if it was saved.  The big problem here is that the
   code that does the save/restore is generated by the linker, so
   code that does the save/restore is generated by the linker, so
   we have no good way to determine at compile time what to do.  */
   we have no good way to determine at compile time what to do.  */
 
 
#ifdef __64BIT__
#ifdef __64BIT__
#define MD_FROB_UPDATE_CONTEXT(CTX, FS)                                 \
#define MD_FROB_UPDATE_CONTEXT(CTX, FS)                                 \
  do {                                                                  \
  do {                                                                  \
    if ((FS)->regs.reg[2].how == REG_UNSAVED)                           \
    if ((FS)->regs.reg[2].how == REG_UNSAVED)                           \
      {                                                                 \
      {                                                                 \
        unsigned int *insn                                              \
        unsigned int *insn                                              \
          = (unsigned int *)                                            \
          = (unsigned int *)                                            \
            _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM);                \
            _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM);                \
        if (*insn == 0xE8410028)                                        \
        if (*insn == 0xE8410028)                                        \
          _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 40);                 \
          _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 40);                 \
      }                                                                 \
      }                                                                 \
  } while (0)
  } while (0)
#else
#else
#define MD_FROB_UPDATE_CONTEXT(CTX, FS)                                 \
#define MD_FROB_UPDATE_CONTEXT(CTX, FS)                                 \
  do {                                                                  \
  do {                                                                  \
    if ((FS)->regs.reg[2].how == REG_UNSAVED)                           \
    if ((FS)->regs.reg[2].how == REG_UNSAVED)                           \
      {                                                                 \
      {                                                                 \
        unsigned int *insn                                              \
        unsigned int *insn                                              \
          = (unsigned int *)                                            \
          = (unsigned int *)                                            \
            _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM);                \
            _Unwind_GetGR ((CTX), LINK_REGISTER_REGNUM);                \
        if (*insn == 0x80410014)                                        \
        if (*insn == 0x80410014)                                        \
          _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 20);                 \
          _Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 20);                 \
      }                                                                 \
      }                                                                 \
  } while (0)
  } while (0)
#endif
#endif
 
 
#define PROFILE_HOOK(LABEL)   output_profile_hook (LABEL)
#define PROFILE_HOOK(LABEL)   output_profile_hook (LABEL)
 
 
/* Print subsidiary information on the compiler version in use.  */
/* Print subsidiary information on the compiler version in use.  */
#define TARGET_VERSION ;
#define TARGET_VERSION ;
 
 
/* No version of AIX fully supports AltiVec or 64-bit instructions in
/* No version of AIX fully supports AltiVec or 64-bit instructions in
   32-bit mode.  */
   32-bit mode.  */
#define OS_MISSING_POWERPC64 1
#define OS_MISSING_POWERPC64 1
#define OS_MISSING_ALTIVEC 1
#define OS_MISSING_ALTIVEC 1
 
 
/* WINT_TYPE */
/* WINT_TYPE */
#define WINT_TYPE "int"
#define WINT_TYPE "int"
 
 

powered by: WebSVN 2.1.0

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