OSDN Git Service

* config/alpha/alpha.c (struct machine_function): New flag for VMS,
[pf3gnuchains/gcc-fork.git] / gcc / config / alpha / vms.h
index b2fb213..7b149f1 100644 (file)
@@ -1,5 +1,6 @@
 /* Output variables, constants and external declarations, for GNU compiler.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008,
+   2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -21,6 +22,10 @@ along with GCC; see the file COPYING3.  If not see
 #define TARGET_OBJECT_SUFFIX ".obj"
 #define TARGET_EXECUTABLE_SUFFIX ".exe"
 
+/* Alpha/VMS object format is not really Elf, but this makes compiling
+   crtstuff.c and dealing with shared library initialization much easier.  */
+#define OBJECT_FORMAT_ELF
+
 /* This enables certain macros in alpha.h, which will make an indirect
    reference to an external symbol an invalid address.  This needs to be
    defined before we include alpha.h, since it determines which macros
@@ -50,6 +55,8 @@ along with GCC; see the file COPYING3.  If not see
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);           
 
+#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
+
 #undef PCC_STATIC_STRUCT_RETURN
 
 /* "long" is 32 bits, but 64 bits for Ada.  */
@@ -62,6 +69,8 @@ along with GCC; see the file COPYING3.  If not see
 #define POINTER_SIZE 32
 #define POINTERS_EXTEND_UNSIGNED 0
 
+#define HANDLE_SYSV_PRAGMA 1
+
 #define MAX_OFILE_ALIGNMENT 524288  /* 8 x 2^16 by DEC Ada Test CD40VRA */
 
 #undef FIXED_REGISTERS
@@ -197,9 +206,17 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
 #undef STACK_CHECK_BUILTIN
 #define STACK_CHECK_BUILTIN 0
 
+#undef  ASM_WEAKEN_LABEL
+#define ASM_WEAKEN_LABEL(FILE, NAME)                            \
+   do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME);  \
+        fputc ('\n', FILE); } while (0)
+
 #define READONLY_DATA_SECTION_ASM_OP "\t.rdata"
 #define CTORS_SECTION_ASM_OP "\t.ctors"
 #define DTORS_SECTION_ASM_OP "\t.dtors"
+#define SDATA_SECTION_ASM_OP "\t.sdata"
+#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)              \
+   asm (SECTION_OP "\n\t.long " #FUNC"\n");
 
 #undef ASM_OUTPUT_ADDR_DIFF_ELT
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) gcc_unreachable ()
@@ -230,21 +247,7 @@ do {                                                                       \
 } while (0)
 
 \f
-/* Output assembler code for a block containing the constant parts
-   of a trampoline, leaving space for the variable parts.
-
-   The trampoline should set the static chain pointer to value placed
-   into the trampoline and should branch to the specified routine.  
-   Note that $27 has been set to the address of the trampoline, so we can
-   use it for addressability of the two data items.  */
-
 #undef TRAMPOLINE_TEMPLATE
-#define TRAMPOLINE_TEMPLATE(FILE)              \
-{                                              \
-  fprintf (FILE, "\t.quad 0\n");               \
-  fprintf (FILE, "\t.linkage __tramp\n");      \
-  fprintf (FILE, "\t.quad 0\n");               \
-}
 
 /* Length in units of the trampoline for entering a nested function.  */
 
@@ -282,8 +285,15 @@ do {                                                                       \
   gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, 8))
 
 #define LINK_EH_SPEC "vms-dwarf2eh.o%s "
+#define LINK_GCC_C_SEQUENCE_SPEC "%G"
+
+#ifdef IN_LIBGCC2
+/* Get the definition for MD_FALLBACK_FRAME_STATE_FOR from a separate
+   file. This avoids having to recompile the world instead of libgcc only
+   when changes to this macro are exercised.  */
 
 #define MD_UNWIND_SUPPORT "config/alpha/vms-unwind.h"
+#endif
 
 /* This is how to output an assembler line
    that says to advance the location counter
@@ -343,8 +353,13 @@ do {                                                                       \
 %{g2:-g2 vms-dwarf2.o%s} %{g3:-g3 vms-dwarf2.o%s} %{shared} %{v} %{map}"
 
 #undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{!shared:%{mvms-return-codes:vcrt0.o%s} \
-%{!mvms-return-codes:pcrt0.o%s}}"
+#define STARTFILE_SPEC \
+"%{!shared:%{mvms-return-codes:vcrt0.o%s} %{!mvms-return-codes:pcrt0.o%s} \
+    crtbegin.o%s} \
+ %{!static:%{shared:crtbeginS.o%s}}"
+
+#define ENDFILE_SPEC \
+"%{!shared:crtend.o%s} %{!static:%{shared:crtendS.o%s}}"
 
 #undef LIB_SPEC
 #define LIB_SPEC "-lc"
@@ -352,17 +367,6 @@ do {                                                                       \
 #define NAME__MAIN "__gccmain"
 #define SYMBOL__MAIN __gccmain
 
-#define MD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
-#define MD_STARTFILE_PREFIX "/gnu/lib/gcc-lib/"
-
-/* Specify the list of include file directories.  */
-#define INCLUDE_DEFAULTS                  \
-{                                         \
-  { "/gnu/lib/gcc-lib/include", 0, 0, 0 }, \
-  { "/gnu_gxx_include", 0, 1, 1 },        \
-  { "/gnu_cc_include", 0, 0, 0 },         \
-  { "/gnu/include", 0, 0, 0 },            \
-  { 0, 0, 0, 0 }                          \
-}
+#define INIT_SECTION_ASM_OP "\t.section LIB$INITIALIZE,GBL,NOWRT"
 
 #define LONGLONG_STANDALONE 1