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.0rc1/] [gcc/] [config/] [ia64/] [vms.h] - Diff between revs 282 and 338

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

Rev 282 Rev 338
/* Definitions of target machine GNU compiler. IA64-VMS version.
/* Definitions of target machine GNU compiler. IA64-VMS version.
   Copyright (C) 2003-2009 Free Software Foundation, Inc.
   Copyright (C) 2003-2009 Free Software Foundation, Inc.
   Contributed by Douglas B Rupp (rupp@gnat.com).
   Contributed by Douglas B Rupp (rupp@gnat.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/>.  */
 
 
#define TARGET_OBJECT_SUFFIX ".obj"
#define TARGET_OBJECT_SUFFIX ".obj"
#define TARGET_EXECUTABLE_SUFFIX ".exe"
#define TARGET_EXECUTABLE_SUFFIX ".exe"
 
 
#define OBJECT_FORMAT_ELF
#define OBJECT_FORMAT_ELF
 
 
#define TARGET_OS_CPP_BUILTINS()                \
#define TARGET_OS_CPP_BUILTINS()                \
    do {                                        \
    do {                                        \
        builtin_define_std ("vms");             \
        builtin_define_std ("vms");             \
        builtin_define_std ("VMS");             \
        builtin_define_std ("VMS");             \
        builtin_define ("__IA64");              \
        builtin_define ("__IA64");              \
        builtin_assert ("system=vms");          \
        builtin_assert ("system=vms");          \
        builtin_define ("__IEEE_FLOAT");        \
        builtin_define ("__IEEE_FLOAT");        \
    } while (0)
    } while (0)
 
 
/* By default, allow $ to be part of an identifier.  */
/* By default, allow $ to be part of an identifier.  */
#define DOLLARS_IN_IDENTIFIERS 2
#define DOLLARS_IN_IDENTIFIERS 2
 
 
#undef TARGET_ABI_OPEN_VMS
#undef TARGET_ABI_OPEN_VMS
#define TARGET_ABI_OPEN_VMS 1
#define TARGET_ABI_OPEN_VMS 1
 
 
#undef TARGET_NAME   
#undef TARGET_NAME   
#define TARGET_NAME "OpenVMS/IA64"
#define TARGET_NAME "OpenVMS/IA64"
#undef TARGET_VERSION
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);           
#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);           
 
 
/* Need .debug_line info generated from gcc and gas.  */
/* Need .debug_line info generated from gcc and gas.  */
#undef TARGET_DEFAULT
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_GNU_AS)
#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_GNU_AS)
 
 
#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
 
 
/* "long" is 32 bits, but 64 bits for Ada.  */
/* "long" is 32 bits, but 64 bits for Ada.  */
#undef LONG_TYPE_SIZE
#undef LONG_TYPE_SIZE
#define LONG_TYPE_SIZE 32
#define LONG_TYPE_SIZE 32
#define ADA_LONG_TYPE_SIZE 64
#define ADA_LONG_TYPE_SIZE 64
 
 
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended.  */
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended.  */
#undef POINTER_SIZE
#undef POINTER_SIZE
#define POINTER_SIZE 32
#define POINTER_SIZE 32
#define POINTERS_EXTEND_UNSIGNED 0
#define POINTERS_EXTEND_UNSIGNED 0
 
 
#undef MAX_OFILE_ALIGNMENT
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT 524288  /* 8 x 2^16 by DEC Ada Test CD40VRA */
#define MAX_OFILE_ALIGNMENT 524288  /* 8 x 2^16 by DEC Ada Test CD40VRA */
 
 
/* Widest floating-point type efficiently supported by hardware and OS.  */
/* Widest floating-point type efficiently supported by hardware and OS.  */
#undef WIDEST_HARDWARE_FP_SIZE
#undef WIDEST_HARDWARE_FP_SIZE
#define WIDEST_HARDWARE_FP_SIZE 64
#define WIDEST_HARDWARE_FP_SIZE 64
 
 
/* The structure return address arrives as an "argument" on VMS.  */
/* The structure return address arrives as an "argument" on VMS.  */
#undef PCC_STATIC_STRUCT_RETURN
#undef PCC_STATIC_STRUCT_RETURN
 
 
/* Turn on VMS specific Dwarf2 features.  */
/* Turn on VMS specific Dwarf2 features.  */
#define VMS_DEBUGGING_INFO 1
#define VMS_DEBUGGING_INFO 1
 
 
#define ASM_OUTPUT_DWARF_DELTA_UNITS(FILE,SIZE,LABEL1,LABEL2,UNITS) \
#define ASM_OUTPUT_DWARF_DELTA_UNITS(FILE,SIZE,LABEL1,LABEL2,UNITS) \
do {                                \
do {                                \
  fprintf (FILE, "\tdata4.ua\t ("); \
  fprintf (FILE, "\tdata4.ua\t ("); \
  assemble_name (FILE, LABEL1);     \
  assemble_name (FILE, LABEL1);     \
  fprintf (FILE, "-");              \
  fprintf (FILE, "-");              \
  assemble_name (FILE, LABEL2);     \
  assemble_name (FILE, LABEL2);     \
  fprintf (FILE, ")/16*3");         \
  fprintf (FILE, ")/16*3");         \
} while (0)
} while (0)
 
 
#undef STARTFILE_SPEC
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
#define STARTFILE_SPEC \
"%{!shared:%{mvms-return-codes:vcrt0.o%s} %{!mvms-return-codes:pcrt0.o%s} \
"%{!shared:%{mvms-return-codes:vcrt0.o%s} %{!mvms-return-codes:pcrt0.o%s} \
    crtbegin.o%s} \
    crtbegin.o%s} \
 %{!static:%{shared:crtinitS.o%s crtbeginS.o%s}}"
 %{!static:%{shared:crtinitS.o%s crtbeginS.o%s}}"
 
 
#undef ENDFILE_SPEC
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{!static:%{shared:crtendS.o%s}}"
"%{!shared:crtend.o%s} %{!static:%{shared:crtendS.o%s}}"
 
 
#define LINK_GCC_C_SEQUENCE_SPEC "%G"
#define LINK_GCC_C_SEQUENCE_SPEC "%G"
 
 
#undef LINK_SPEC
#undef LINK_SPEC
#define LINK_SPEC "%{g*} %{map} %{save-temps} %{shared} %{v}"
#define LINK_SPEC "%{g*} %{map} %{save-temps} %{shared} %{v}"
 
 
#undef LIB_SPEC
#undef LIB_SPEC
#define LIB_SPEC ""
#define LIB_SPEC ""
 
 
#undef ASM_SPEC
#undef ASM_SPEC
#define ASM_SPEC \
#define ASM_SPEC \
"%{mno-gnu-as:-N so -N vms_upcase -W DVLoc_off} %{mconstant-gp:-M const_gp} \
"%{mno-gnu-as:-N so -N vms_upcase -W DVLoc_off} %{mconstant-gp:-M const_gp} \
 %{mauto-pic:-M no_plabel} %{source-listing:-ahdl=%b.lis}"
 %{mauto-pic:-M no_plabel} %{source-listing:-ahdl=%b.lis}"
 
 
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                  \
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                  \
do {                                                            \
do {                                                            \
  (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0));      \
  (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0));      \
  ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function");   \
  ASM_OUTPUT_TYPE_DIRECTIVE (FILE, XSTR (FUN, 0), "function");   \
} while (0)
} while (0)
 
 
/* Set the function to change the names of the division and modulus
/* Set the function to change the names of the division and modulus
   functions.   */
   functions.   */
#undef TARGET_INIT_LIBFUNCS
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS ia64_vms_init_libfuncs
#define TARGET_INIT_LIBFUNCS ia64_vms_init_libfuncs
 
 
#define NAME__MAIN "__gccmain"
#define NAME__MAIN "__gccmain"
#define SYMBOL__MAIN __gccmain
#define SYMBOL__MAIN __gccmain
 
 
#define CTOR_LIST_BEGIN asm (".global\tLIB$INITIALIZE#\n");                  \
#define CTOR_LIST_BEGIN asm (".global\tLIB$INITIALIZE#\n");                  \
STATIC func_ptr __CTOR_LIST__[1]                                             \
STATIC func_ptr __CTOR_LIST__[1]                                             \
  __attribute__ ((__unused__, section(".ctors"), aligned(sizeof(func_ptr)))) \
  __attribute__ ((__unused__, section(".ctors"), aligned(sizeof(func_ptr)))) \
  = { (func_ptr) (-1) };
  = { (func_ptr) (-1) };
 
 
#undef INIT_SECTION_ASM_OP
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP ".section\tLIB$INITIALIZE#,\"a\",@progbits"
#define INIT_SECTION_ASM_OP ".section\tLIB$INITIALIZE#,\"a\",@progbits"
 
 
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
  asm (SECTION_OP "\n\tdata4 @fptr(" #FUNC"#)\n");      \
  asm (SECTION_OP "\n\tdata4 @fptr(" #FUNC"#)\n");      \
  FORCE_CODE_SECTION_ALIGN                            \
  FORCE_CODE_SECTION_ALIGN                            \
  asm (TEXT_SECTION_ASM_OP);
  asm (TEXT_SECTION_ASM_OP);
 
 
#undef FINI_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
 
 
/* Maybe same as HPUX?  Needs to be checked.  */
/* Maybe same as HPUX?  Needs to be checked.  */
#define JMP_BUF_SIZE  (8 * 76)
#define JMP_BUF_SIZE  (8 * 76)
 
 
typedef struct crtl_name_spec
typedef struct crtl_name_spec
{
{
  const char *const name;
  const char *const name;
  const char *deccname;
  const char *deccname;
  int referenced;
  int referenced;
} crtl_name_spec;
} crtl_name_spec;
 
 
#include "config/vms/vms-crtl.h"
#include "config/vms/vms-crtl.h"
 
 
/* Alias CRTL names to 32/64bit DECCRTL functions.
/* Alias CRTL names to 32/64bit DECCRTL functions.
   Fixme: This should do a binary search.  */
   Fixme: This should do a binary search.  */
#define DO_CRTL_NAMES                                                      \
#define DO_CRTL_NAMES                                                      \
  do                                                                       \
  do                                                                       \
    {                                                                      \
    {                                                                      \
      int i;                                                               \
      int i;                                                               \
      static crtl_name_spec vms_crtl_names[] = CRTL_NAMES;                 \
      static crtl_name_spec vms_crtl_names[] = CRTL_NAMES;                 \
      static int malloc64_init = 0;                                        \
      static int malloc64_init = 0;                                        \
                                                                           \
                                                                           \
      if ((malloc64_init == 0) && TARGET_MALLOC64)                         \
      if ((malloc64_init == 0) && TARGET_MALLOC64)                         \
        {                                                                  \
        {                                                                  \
          for (i=0; vms_crtl_names [i].name; i++)                          \
          for (i=0; vms_crtl_names [i].name; i++)                          \
            {                                                              \
            {                                                              \
              if (strcmp ("calloc", vms_crtl_names [i].name) == 0)         \
              if (strcmp ("calloc", vms_crtl_names [i].name) == 0)         \
                vms_crtl_names [i].deccname = "decc$_calloc64";            \
                vms_crtl_names [i].deccname = "decc$_calloc64";            \
              else                                                         \
              else                                                         \
              if (strcmp ("malloc", vms_crtl_names [i].name) == 0)         \
              if (strcmp ("malloc", vms_crtl_names [i].name) == 0)         \
                vms_crtl_names [i].deccname = "decc$_malloc64";            \
                vms_crtl_names [i].deccname = "decc$_malloc64";            \
              else                                                         \
              else                                                         \
              if (strcmp ("realloc", vms_crtl_names [i].name) == 0)        \
              if (strcmp ("realloc", vms_crtl_names [i].name) == 0)        \
                vms_crtl_names [i].deccname = "decc$_realloc64";           \
                vms_crtl_names [i].deccname = "decc$_realloc64";           \
              else                                                         \
              else                                                         \
              if (strcmp ("strdup", vms_crtl_names [i].name) == 0)         \
              if (strcmp ("strdup", vms_crtl_names [i].name) == 0)         \
                vms_crtl_names [i].deccname = "decc$_strdup64";            \
                vms_crtl_names [i].deccname = "decc$_strdup64";            \
            }                                                              \
            }                                                              \
            malloc64_init = 1;                                             \
            malloc64_init = 1;                                             \
        }                                                                  \
        }                                                                  \
      for (i=0; vms_crtl_names [i].name; i++)                              \
      for (i=0; vms_crtl_names [i].name; i++)                              \
        if (!vms_crtl_names [i].referenced &&                              \
        if (!vms_crtl_names [i].referenced &&                              \
            (strcmp (name, vms_crtl_names [i].name) == 0))                 \
            (strcmp (name, vms_crtl_names [i].name) == 0))                 \
          {                                                                \
          {                                                                \
            fprintf (file, "\t.alias %s, \"%s\"\n",                        \
            fprintf (file, "\t.alias %s, \"%s\"\n",                        \
                     name, vms_crtl_names [i].deccname);                   \
                     name, vms_crtl_names [i].deccname);                   \
            vms_crtl_names [i].referenced = 1;                             \
            vms_crtl_names [i].referenced = 1;                             \
          }                                                                \
          }                                                                \
    } while (0)
    } while (0)
 
 
#undef OPTIMIZATION_OPTIONS
#undef OPTIMIZATION_OPTIONS
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE)                   \
#define OPTIMIZATION_OPTIONS(LEVEL,SIZE)                   \
  do {                                                     \
  do {                                                     \
       flag_merge_constants = 0;                           \
       flag_merge_constants = 0;                           \
       ia64_optimization_options ((LEVEL), (SIZE));        \
       ia64_optimization_options ((LEVEL), (SIZE));        \
  } while (0)
  } while (0)
 
 
/* Define this to be nonzero if static stack checking is supported.  */
/* Define this to be nonzero if static stack checking is supported.  */
#define STACK_CHECK_STATIC_BUILTIN 1
#define STACK_CHECK_STATIC_BUILTIN 1
 
 
#define MD_UNWIND_SUPPORT "config/ia64/vms-unwind.h"
#define MD_UNWIND_SUPPORT "config/ia64/vms-unwind.h"
 
 
#define UNW_IVMS_MODE(HEADER) (((HEADER) >> 44) & 0x3L)
#define UNW_IVMS_MODE(HEADER) (((HEADER) >> 44) & 0x3L)
#define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) (!UNW_IVMS_MODE (HEADER))
#define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) (!UNW_IVMS_MODE (HEADER))
 
 
/* Minimum amount of stack required to recover from an anticipated stack
/* Minimum amount of stack required to recover from an anticipated stack
   overflow detection.  The default value conveys an estimate of the amount
   overflow detection.  The default value conveys an estimate of the amount
   of stack required to propagate an exception.  */
   of stack required to propagate an exception.  */
#define STACK_CHECK_PROTECT (24 * 1024)
#define STACK_CHECK_PROTECT (24 * 1024)
 
 
#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
  ia64_vms_output_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN)
  ia64_vms_output_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN)
 
 
#undef TARGET_VALID_POINTER_MODE
#undef TARGET_VALID_POINTER_MODE
#define TARGET_VALID_POINTER_MODE ia64_vms_valid_pointer_mode
#define TARGET_VALID_POINTER_MODE ia64_vms_valid_pointer_mode
 
 
#undef TARGET_ASM_NAMED_SECTION
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION ia64_vms_elf_asm_named_section
#define TARGET_ASM_NAMED_SECTION ia64_vms_elf_asm_named_section
 
 

powered by: WebSVN 2.1.0

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