target.h (struct gcc_target): Line wrap.
authorRichard Henderson <rth@redhat.com>
Sun, 20 Oct 2002 22:37:14 +0000 (15:37 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 20 Oct 2002 22:37:14 +0000 (15:37 -0700)
* target.h (struct gcc_target): Line wrap.

* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Static.
(TARGET_ASM_OUTPUT_MI_THUNK): Define here...
* config/alpha/alpha.h: ... not here.
* config/alpha/alpha-protos.h: Update.

* config/arm/arm.c, config/arm/arm.h, config/arm/arm-protos.h
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/frv/frv-protos.h, config/frv/frv.c, config/frv/frv.h,
config/i386/i386-protos.h, config/i386/i386.c, config/i386/openbsd.h,
config/i386/unix.h, config/i960/i960-protos.h, config/i960/i960.c,
config/i960/i960.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m68k/linux.h, config/m68k/m68k-protos.h,
config/m68k/m68k.c, config/m68k/netbsd-elf.h, config/m68k/openbsd.h,
config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h,
config/pa/pa-protos.h, config/pa/pa.c, config/pa/pa.h,
config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h,
config/sparc/openbsd.h, config/sparc/sparc-protos.h,
config/sparc/sparc.c, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h: Similarly.

* config/m68k/m68k.c (m68k_output_mi_thunk): Replicate mnemonic
selection logic from call patterns.

From-SVN: r58340

46 files changed:
gcc/ChangeLog
gcc/config/alpha/alpha-protos.h
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.h
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/cris/cris-protos.h
gcc/config/cris/cris.c
gcc/config/cris/cris.h
gcc/config/d30v/d30v.h
gcc/config/frv/frv-protos.h
gcc/config/frv/frv.c
gcc/config/frv/frv.h
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/openbsd.h
gcc/config/i386/unix.h
gcc/config/i960/i960-protos.h
gcc/config/i960/i960.c
gcc/config/i960/i960.h
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h
gcc/config/m68k/linux.h
gcc/config/m68k/m68k-protos.h
gcc/config/m68k/m68k.c
gcc/config/m68k/netbsd-elf.h
gcc/config/m68k/openbsd.h
gcc/config/mmix/mmix-protos.h
gcc/config/mmix/mmix.c
gcc/config/mmix/mmix.h
gcc/config/pa/pa-protos.h
gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h
gcc/config/sparc/openbsd.h
gcc/config/sparc/sparc-protos.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.h
gcc/config/stormy16/stormy16-protos.h
gcc/config/stormy16/stormy16.c
gcc/config/stormy16/stormy16.h
gcc/target.h

index d9d062d976f1c278977cb2b6fdc26560effea681..33e88b92402ccd92463b39ff6b424ed49ceea410 100644 (file)
@@ -1,3 +1,31 @@
+2002-10-20  Richard Henderson  <rth@redhat.com>
+
+       * target.h (struct gcc_target): Line wrap.
+
+       * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Static.
+       (TARGET_ASM_OUTPUT_MI_THUNK): Define here...
+       * config/alpha/alpha.h: ... not here.
+       * config/alpha/alpha-protos.h: Update.
+
+       * config/arm/arm.c, config/arm/arm.h, config/arm/arm-protos.h
+       config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
+       config/frv/frv-protos.h, config/frv/frv.c, config/frv/frv.h,
+       config/i386/i386-protos.h, config/i386/i386.c, config/i386/openbsd.h,
+       config/i386/unix.h, config/i960/i960-protos.h, config/i960/i960.c,
+       config/i960/i960.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
+       config/ia64/ia64.h, config/m68k/linux.h, config/m68k/m68k-protos.h,
+       config/m68k/m68k.c, config/m68k/netbsd-elf.h, config/m68k/openbsd.h,
+       config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h,
+       config/pa/pa-protos.h, config/pa/pa.c, config/pa/pa.h, 
+       config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h,
+       config/sparc/openbsd.h, config/sparc/sparc-protos.h,
+       config/sparc/sparc.c, config/sparc/sparc.h,
+       config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
+       config/stormy16/stormy16.h: Similarly.
+
+       * config/m68k/m68k.c (m68k_output_mi_thunk): Replicate mnemonic
+       selection logic from call patterns.
+
 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
 
        * config/m68k/m68k.c (m68k_output_mi_thunk): Fix typo.
index 92b6d5544c72e1915958b2d808483243a0ff84c8..71079eff7e8045b6588244b54354bcb99c61fcdc 100644 (file)
@@ -141,7 +141,6 @@ extern rtx function_arg PARAMS ((CUMULATIVE_ARGS, enum machine_mode,
                                 tree, int));
 extern void alpha_start_function PARAMS ((FILE *, const char *, tree));
 extern void alpha_end_function PARAMS ((FILE *, const char *, tree));
-extern void alpha_output_mi_thunk_osf PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
 #ifdef REAL_VALUE_TYPE
 extern int check_float_value PARAMS ((enum machine_mode,
index b6bcc324ab3baa33e6038d4b2b068b3975f51d8f..8f900af4e5b8a5e72fe6455fba705690af81d1bd 100644 (file)
@@ -195,6 +195,11 @@ static void alpha_write_linkage
   PARAMS ((FILE *, const char *, tree));
 #endif
 
+#if TARGET_ABI_OSF
+static void alpha_output_mi_thunk_osf
+  PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
+#endif
+
 static struct machine_function * alpha_init_machine_status
   PARAMS ((void));
 
@@ -292,6 +297,11 @@ static void unicosmk_unique_section PARAMS ((tree, int));
 #undef  TARGET_EXPAND_BUILTIN
 #define TARGET_EXPAND_BUILTIN alpha_expand_builtin
 
+#if TARGET_ABI_OSF
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK alpha_output_mi_thunk_osf
+#endif
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Parse target option strings.  */
@@ -7839,7 +7849,8 @@ alpha_end_function (file, fnname, decl)
     }
 }
 
-/* Emit a tail call to FUNCTION after adjusting THIS by DELTA. 
+#if TARGET_ABI_OSF
+/* Emit a tail call to FUNCTION after adjusting THIS by DELTA.
 
    In order to avoid the hordes of differences between generated code
    with and without TARGET_EXPLICIT_RELOCS, and to avoid duplicating
@@ -7848,7 +7859,7 @@ alpha_end_function (file, fnname, decl)
 
    Not sure why this idea hasn't been explored before...  */
 
-void
+static void
 alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function)
      FILE *file;
      tree thunk_fndecl ATTRIBUTE_UNUSED;
@@ -7908,6 +7919,7 @@ alpha_output_mi_thunk_osf (file, thunk_fndecl, delta, function)
   final (insn, file, 1, 0);
   final_end_function ();
 }
+#endif /* TARGET_ABI_OSF */
 \f
 /* Debugging support.  */
 
index 461dc959c8e817068a5f150817ac9d71583a20ad..39973770d7114d5067983526c3b64a46adfd053a 100644 (file)
@@ -2138,7 +2138,3 @@ do {                                                      \
 
 /* Generate calls to memcpy, etc., not bcopy, etc.  */
 #define TARGET_MEM_FUNCTIONS 1
-
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK alpha_output_mi_thunk_osf
index d1fd43b39c7f761821fe64c3d6ca7bc991d9cc6f..2055d1467613877ff577f0262048f8f5d6e2db72 100644 (file)
@@ -194,7 +194,6 @@ extern int  arm_dllexport_p                 PARAMS ((tree));
 extern int  arm_dllimport_p            PARAMS ((tree));
 extern void arm_mark_dllexport                 PARAMS ((tree));
 extern void arm_mark_dllimport                 PARAMS ((tree));
-extern void arm_output_mi_thunk         PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 #endif
 
 extern void arm_init_builtins          PARAMS ((void));
index fa046e10860b8a847f37b49db1069c2dda9c678f..70e0291403abdccd5390886d799ad56468257378 100644 (file)
@@ -126,6 +126,8 @@ static void  arm_encode_section_info        PARAMS ((tree, int));
 #ifdef AOF_ASSEMBLER
 static void     aof_globalize_label            PARAMS ((FILE *, const char *));
 #endif
+static void arm_output_mi_thunk                        PARAMS ((FILE *, tree,
+                                                        HOST_WIDE_INT, tree));
 
 #undef Hint
 #undef Mmode
@@ -188,6 +190,9 @@ static void  aof_globalize_label            PARAMS ((FILE *, const char *));
 #undef TARGET_STRIP_NAME_ENCODING
 #define TARGET_STRIP_NAME_ENCODING arm_strip_name_encoding
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK arm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Obstack for minipool constant handling.  */
@@ -11131,7 +11136,10 @@ arm_encode_section_info (decl, first)
 }
 #endif /* !ARM_PE */
 
-void
+/* Output code to add DELTA to the first argument, and then jump
+   to FUNCTION.  Used for C++ multiple inheritance.  */
+
+static void
 arm_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
index b4f6e705aa651a6d2d0cd10e59bbdcf792815b4c..2f5ba3b7262147f176a2c0908368ae51468d521d 100644 (file)
@@ -2695,10 +2695,6 @@ extern int making_const_table;
   else                                         \
     THUMB_PRINT_OPERAND_ADDRESS (STREAM, X)
      
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK arm_output_mi_thunk
-
 /* A C expression whose value is RTL representing the value of the return
    address for the frame COUNT steps up from the current frame.  */
 
index a86ae714bd8a5e21d92f929452ece28ebe66cb11..7da668eeefa395720a545915e82db3e2fcde4a9f 100644 (file)
@@ -52,12 +52,6 @@ extern rtx cris_expand_builtin_va_arg PARAMS ((tree, tree));
 # endif
 #endif /* RTX_CODE */
 
-#ifdef STDIO_INCLUDED
-# ifdef TREE_CODE
-extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
-# endif
-#endif
-
 #ifdef GCC_C_PRAGMA_H
 extern void cris_pragma_expand_mul PARAMS ((cpp_reader *));
 #endif
index 4128742a5bc25d90d9885f677738ed908207453b..3d33a724594ee835a799a259874e046bbd2699a7 100644 (file)
@@ -101,6 +101,10 @@ static void cris_target_asm_function_epilogue
 static void cris_encode_section_info PARAMS ((tree, int));
 static void cris_operand_lossage PARAMS ((const char *, rtx));
 
+static void cris_asm_output_mi_thunk
+  PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
+
+
 /* The function cris_target_asm_function_epilogue puts the last insn to
    output here.  It always fits; there won't be a symbol operand.  Used in
    delay_slots_for_epilogue and function_epilogue.  */
@@ -153,6 +157,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO cris_encode_section_info
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK cris_asm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Predicate functions.  */
@@ -2572,7 +2579,7 @@ cris_override_options ()
 
 /* The TARGET_ASM_OUTPUT_MI_THUNK worker.  */
 
-void
+static void
 cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl)
      FILE *stream;
      tree thunkdecl ATTRIBUTE_UNUSED;
index 717f24979285d8411a4b4e22425f806370c6696b..4aa88466c809690050c71659216d344d395d6194 100644 (file)
@@ -1013,9 +1013,6 @@ struct cum_args {int regs;};
 #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) \
   cris_eligible_for_epilogue_delay (INSN)
 
-#define TARGET_ASM_OUTPUT_MI_THUNK cris_asm_output_mi_thunk
-
-
 /* Node: Profiling */
 
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
index 32cff3c2bb5460e7519aa57252f02b08e28773ec..3c9bff6d31044198ae6bf3789208c5c9010ebbbf 100644 (file)
@@ -1879,37 +1879,6 @@ typedef struct d30v_stack {
    `DELAY_SLOTS_FOR_EPILOGUE'.  */
 /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */
 
-/* A C compound statement that outputs the assembler code for a thunk function,
-   used to implement C++ virtual function calls with multiple inheritance.  The
-   thunk acts as a wrapper around a virtual function, adjusting the implicit
-   object parameter before handing control off to the real function.
-
-   First, emit code to add the integer DELTA to the location that contains the
-   incoming first argument.  Assume that this argument contains a pointer, and
-   is the one used to pass the `this' pointer in C++.  This is the incoming
-   argument *before* the function prologue, e.g. `%o0' on a sparc.  The
-   addition must preserve the values of all other incoming arguments.
-
-   After the addition, emit code to jump to FUNCTION, which is a
-   `FUNCTION_DECL'.  This is a direct pure jump, not a call, and does not touch
-   the return address.  Hence returning from FUNCTION will return to whoever
-   called the current `thunk'.
-
-   The effect must be as if FUNCTION had been called directly with the
-   adjusted first argument.  This macro is responsible for emitting
-   all of the code for a thunk function; output_function_prologue()
-   and output_function_epilogue() are not invoked.
-
-   The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been
-   extracted from it.)  It might possibly be useful on some targets, but
-   probably not.
-
-   If you do not define this macro, the target-independent code in the C++
-   frontend will generate a less efficient heavyweight thunk that calls
-   FUNCTION instead of jumping to it.  The generic approach does not support
-   varargs.  */
-/* #define TARGET_ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) */
-
 /* A C structure for machine-specific, per-function data.
    This is added to the cfun structure.  */
 typedef struct machine_function GTY(())
index 5965c58b29594cf5eeff4ca1ea8b8c43948153db..4f5a422cbae3eeff09c749cf15bcb70dbecb36d0 100644 (file)
@@ -113,11 +113,6 @@ extern rtx frv_return_addr_rtx                     PARAMS ((int, rtx));
 extern rtx frv_index_memory                    PARAMS ((rtx,
                                                         enum machine_mode,
                                                         int));
-
-#ifdef TREE_CODE
-extern void frv_asm_output_mi_thunk            PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
-#endif /* TREE_CODE */
-
 extern const char *frv_asm_output_opcode
                                        PARAMS ((FILE *, const char *));
 extern void frv_final_prescan_insn     PARAMS ((rtx, rtx *, int));
index 39a1cd77b98d79dd70164b18c0b43ff489a2b7bd..7ef2e1adbfba744185478c6c66bc7d0c7a5f22a5 100644 (file)
@@ -279,6 +279,7 @@ static void frv_encode_section_info         PARAMS ((tree, int));
 static void frv_init_builtins                  PARAMS ((void));
 static rtx frv_expand_builtin                  PARAMS ((tree, rtx, rtx, enum machine_mode, int));
 static bool frv_in_small_data_p                        PARAMS ((tree));
+static void frv_asm_output_mi_thunk            PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 \f
 /* Initialize the GCC target structure.  */
 #undef  TARGET_ASM_FUNCTION_PROLOGUE
@@ -298,6 +299,9 @@ static bool frv_in_small_data_p                     PARAMS ((tree));
 #undef TARGET_IN_SMALL_DATA_P
 #define TARGET_IN_SMALL_DATA_P frv_in_small_data_p
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Given a SYMBOL_REF, return true if it points to small data.  */
@@ -1866,7 +1870,7 @@ frv_expand_epilogue (sibcall_p)
    FUNCTION instead of jumping to it.  The generic approach does not support
    varargs.  */
 
-void
+static void
 frv_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
      FILE *file;
      tree thunk_fndecl ATTRIBUTE_UNUSED;
index f8c2755f1c37f3a35a3be1b78edeb410d25b42d0..954e86f5b4d6e0d784b8636de1f69560197d7cbb 100644 (file)
@@ -2068,38 +2068,6 @@ struct machine_function GTY(())
    adjustment in a function that has no frame pointer, and the compiler knows
    this regardless of `EXIT_IGNORE_STACK'.  */
 #define EXIT_IGNORE_STACK 1
-
-/* A C compound statement that outputs the assembler code for a thunk function,
-   used to implement C++ virtual function calls with multiple inheritance.  The
-   thunk acts as a wrapper around a virtual function, adjusting the implicit
-   object parameter before handing control off to the real function.
-
-   First, emit code to add the integer DELTA to the location that contains the
-   incoming first argument.  Assume that this argument contains a pointer, and
-   is the one used to pass the `this' pointer in C++.  This is the incoming
-   argument *before* the function prologue, e.g. `%o0' on a sparc.  The
-   addition must preserve the values of all other incoming arguments.
-
-   After the addition, emit code to jump to FUNCTION, which is a
-   `FUNCTION_DECL'.  This is a direct pure jump, not a call, and does not touch
-   the return address.  Hence returning from FUNCTION will return to whoever
-   called the current `thunk'.
-
-   The effect must be as if FUNCTION had been called directly with the adjusted
-   first argument.  This macro is responsible for emitting all of the code for
-   a thunk function; `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' are not
-   invoked.
-
-   The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been
-   extracted from it.)  It might possibly be useful on some targets, but
-   probably not.
-
-   If you do not define this macro, the target-independent code in the C++
-   frontend will generate a less efficient heavyweight thunk that calls
-   FUNCTION instead of jumping to it.  The generic approach does not support
-   varargs.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk
-
 \f
 /* Generating Code for Profiling.  */
 
index b38a65ac7dcb9c676110a97cfd1ec8362845071f..df45f6a153cafe4a11ba1913d331fc5f1dabae30 100644 (file)
@@ -211,8 +211,6 @@ extern tree ix86_handle_shared_attribute PARAMS ((tree *, tree, tree, int, bool
 extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *,
                                                        int));
 extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int));
-extern void x86_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
-extern void x86_output_mi_vcall_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
 extern int x86_field_alignment PARAMS ((tree, int));
 #endif
 
index 0569fef495a43347002a9066f65003431fd6a379..50ade5b626586d3e87d0878b25acfb8dd37bae44 100644 (file)
@@ -751,6 +751,9 @@ static int ia32_use_dfa_pipeline_interface PARAMS ((void));
 static int ia32_multipass_dfa_lookahead PARAMS ((void));
 static void ix86_init_mmx_sse_builtins PARAMS ((void));
 static rtx ia32_this_parameter PARAMS ((tree));
+static void x86_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
+static void x86_output_mi_vcall_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
+                                              HOST_WIDE_INT, tree));
 
 struct ix86_address
 {
@@ -897,6 +900,11 @@ static enum x86_64_reg_class merge_classes PARAMS ((enum x86_64_reg_class,
 #define TARGET_HAVE_TLS true
 #endif
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK x86_output_mi_thunk
+#undef TARGET_ASM_OUTPUT_MI_VCALL_THUNK
+#define TARGET_ASM_OUTPUT_MI_VCALL_THUNK x86_output_mi_vcall_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Sometimes certain combinations of command options do not make
@@ -13933,7 +13941,7 @@ ia32_this_parameter (function)
 }
 
 
-void
+static void
 x86_output_mi_vcall_thunk (file, thunk, delta, vcall_index, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
@@ -14037,7 +14045,7 @@ x86_output_mi_vcall_thunk (file, thunk, delta, vcall_index, function)
     }
 }
 
-void
+static void
 x86_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk;
index b792450d1f7540a8c44a5330917d7cca601d9ea9..60f16575e21d415ffe7d329cf74978c401ae020d 100644 (file)
@@ -96,9 +96,6 @@ Boston, MA 02111-1307, USA.  */
 
 #undef ASM_PREFERRED_EH_DATA_FORMAT
 
-
-/* Note that we pick up TARGET_ASM_OUTPUT_MI_THUNK from unix.h.  */
-
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START ";#"
 
index 09493b08808793c2d04afc34f3ac748459bce59d..e69f26d7490c906b6fc44be41920af9b0721324a 100644 (file)
@@ -65,8 +65,3 @@ Boston, MA 02111-1307, USA.  */
    and returns float values in the 387.  */
 
 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
-
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK x86_output_mi_thunk
-#define TARGET_ASM_OUTPUT_MI_VCALL_THUNK x86_output_mi_vcall_thunk
index 594e07dd190cb8560e8776a113503cf578e00f0f..7e2685d9f09e5d858e8969cee9e4d2d752e389a6 100644 (file)
@@ -86,7 +86,6 @@ extern void i960_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine
 extern tree i960_build_va_list PARAMS ((void));
 extern int i960_final_reg_parm_stack_space PARAMS ((int, tree));
 extern int i960_reg_parm_stack_space PARAMS ((tree));
-extern void i960_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 #endif /* TREE_CODE */
 
 extern int process_pragma PARAMS ((int(*)(void), void(*)(int), const char *));
index 40717783d55ea6cf14500fe4d31f07eed319d240..b15e27d9327d1fac0ee79a0effb60751172dee2e 100644 (file)
@@ -46,6 +46,7 @@ Boston, MA 02111-1307, USA.  */
 
 static void i960_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void i960_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
+static void i960_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
 /* Save the operands last given to a compare for use when we
    generate a scc or bcc insn.  */
@@ -98,6 +99,9 @@ static int ret_label = 0;
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE i960_output_function_epilogue
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK i960_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Override conflicting target switch options.
@@ -2825,7 +2829,7 @@ i960_scan_opcode (p)
     }
 }
 
-void
+static void
 i960_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
index ac24ece0fa93b7ca46208dce7aa2fddc6582a75f..9af2964fbbba59dc44bd04b781bb8a5fc3099e12 100644 (file)
@@ -1463,7 +1463,3 @@ extern enum insn_types i960_last_insn_type;
 /* Defined in reload.c, and used in insn-recog.c.  */
 
 extern int rtx_equal_function_value_matters;
-
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK i960_output_mi_thunk
index c4a43cc03081d13cfa1bc2635ca87fe4bd487152..36af17aa70ac04a1f9eeff4b473ddf040600fe8f 100644 (file)
@@ -121,7 +121,6 @@ extern int ia64_function_arg_pass_by_reference PARAMS((CUMULATIVE_ARGS *,
                                                       tree, int));
 extern int ia64_return_in_memory PARAMS((tree));
 extern void ia64_asm_output_external PARAMS((FILE *, tree, const char *));
-extern void ia64_output_mi_thunk PARAMS((FILE *, tree, HOST_WIDE_INT, tree));
 #endif /* TREE_CODE */
 
 extern int ia64_register_move_cost PARAMS((enum machine_mode, enum reg_class,
index 2b74f433e5b69010e9a1fac42576937cc3c55fa1..17c3fc61ac86a289a36ced2b5ba61c3e8ae85978 100644 (file)
@@ -161,6 +161,8 @@ static int ia64_sched_reorder PARAMS ((FILE *, int, rtx *, int *, int));
 static int ia64_sched_reorder2 PARAMS ((FILE *, int, rtx *, int *, int));
 static int ia64_variable_issue PARAMS ((FILE *, int, rtx, int));
 
+static void ia64_output_mi_thunk PARAMS((FILE *, tree, HOST_WIDE_INT, tree));
+
 static void ia64_select_rtx_section PARAMS ((enum machine_mode, rtx,
                                             unsigned HOST_WIDE_INT));
 static void ia64_aix_select_section PARAMS ((tree, int,
@@ -244,6 +246,9 @@ static const struct attribute_spec ia64_attribute_table[] =
 #define TARGET_HAVE_TLS true
 #endif
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK ia64_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Return 1 if OP is a valid operand for the MEM of a CALL insn.  */
@@ -8159,7 +8164,7 @@ ia64_aix_select_rtx_section (mode, x, align)
   flag_pic = save_pic;
 }
 
-void
+static void
 ia64_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
index e0d524800930dcd141c01d3aa7e26bbe61c79e2a..ed1bbac1fa6ddbaabd4944b63bcb0e923171aaa1 100644 (file)
@@ -1428,11 +1428,6 @@ do {                                                                     \
 #define ASM_FILE_START(FILE) \
   emit_safe_across_calls (FILE)
 
-/* A C compound statement that outputs the assembler code for a thunk function,
-   used to implement C++ virtual function calls with multiple inheritance.  */
-
-#define TARGET_ASM_OUTPUT_MI_THUNK ia64_output_mi_thunk
-
 /* Output part N of a function descriptor for DECL.  For ia64, both
    words are emitted with a single relocation, so ignore N > 0.  */
 #define ASM_OUTPUT_FDESC(FILE, DECL, PART)                             \
index ce2fbb089f0911c0e5a910d24298c57432fe3fd9..bf80cea9f9c984ef86ae0d59a94700654cacbb48 100644 (file)
@@ -354,7 +354,3 @@ do {                                                                        \
      : "d" (_beg), "d" (_len)                                          \
      : "%d0", "%d2", "%d3");                                           \
 }
-\f
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK m68k_output_mi_thunk
index 3beec986ae480af3c5b5231b7e68e46468296658..72120ead37f03e6eae3f8fb347132af6b610b358 100644 (file)
@@ -64,10 +64,6 @@ extern int pcrel_address PARAMS ((rtx, enum machine_mode));
 extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
 #endif /* RTX_CODE */
 
-#ifdef TREE_CODE
-extern void m68k_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
-#endif /* TREE_CODE */
-
 extern int flags_in_68881 PARAMS ((void));
 extern int use_return_insn PARAMS ((void));
 extern void override_options PARAMS ((void));
index 66c640cd2f86a2050f5c7c00a9e6c92144ff03e1..9543e98f056576dc2dd7fbecfdb217bdf472750d 100644 (file)
@@ -65,6 +65,7 @@ static void m68k_coff_asm_named_section PARAMS ((const char *, unsigned int));
 #ifdef CTOR_LIST_BEGIN
 static void m68k_svr3_asm_out_constructor PARAMS ((rtx, int));
 #endif
+static void m68k_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 \f
 
 /* Alignment to use for loops and jumps */
@@ -122,6 +123,9 @@ int m68k_last_compare_had_fp_operands;
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE m68k_output_function_epilogue
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK m68k_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Sometimes certain combinations of command options do not make
@@ -3836,34 +3840,67 @@ m68k_svr3_asm_out_constructor (symbol, priority)
 }
 #endif
 
-void
+static void
 m68k_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
      HOST_WIDE_INT delta;
      tree function;
 {
-  if (delta > 0 && delta <= 8)                                         
+  rtx xops[1];
+  const char *fmt;
+
+  if (delta > 0 && delta <= 8)
     asm_fprintf (file, "\taddq.l %I%d,4(%Rsp)\n", (int) delta);
-  else if (delta < 0 && delta >= -8)                                   
+  else if (delta < 0 && delta >= -8)
     asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta);
-  else                                                                 
+  else
     {
       asm_fprintf (file, "\tadd.l %I");
-      fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);          
-      asm_fprintf (file, ",4(%Rsp)\n", delta);         
-    }
-                                                                       
-  if (flag_pic)                                                                
-    {                                                                  
-      fprintf (file, "\tbra.l ");                                      
-      assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));   
-      fprintf (file, "@PLTPC\n");                                      
-    }                                                                  
-  else                                                                 
-    {                                                                  
-      fprintf (file, "\tjmp ");                                                
-      assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));   
-      fprintf (file, "\n");                                            
-    }                                                                  
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
+      asm_fprintf (file, ",4(%Rsp)\n");
+    }
+
+  xops[0] = DECL_RTL (function);
+
+  /* Logic taken from call patterns in m68k.md.  */
+  if (flag_pic)
+    {
+      if (TARGET_PCREL)
+       fmt = "bra.l %o0";
+      else
+       {
+#ifdef MOTOROLA
+#ifdef HPUX_ASM
+         fmt = "bra.l %0";
+#else
+#ifdef USE_GAS
+         fmt = "bra.l %0@PLTPC";
+#else
+         fmt = "bra %0@PLTPC";
+#endif
+#endif
+#else
+#ifdef USE_GAS
+         fmt = "bra.l %0";
+#else
+         fmt = "jbra %0,a1";
+#endif
+#endif
+       }
+    }
+  else
+    {
+#if defined (MOTOROLA) && !defined (USE_GAS)
+#ifdef MOTOROLA_BSR
+      fmt = "bra %0";
+#else
+      fmt = "jmp %0";
+#endif
+#else
+      fmt = "jbra %0";
+#endif
+    }
+
+  output_asm_insn (fmt, xops);
 }
index 107bdeb03df83fdb935b505b0842eb4c30a034cb..f9576da2905151b5363d230280906a04752b0353 100644 (file)
@@ -421,12 +421,6 @@ while (0)
 #undef DEFAULT_PCC_STRUCT_RETURN
 #define DEFAULT_PCC_STRUCT_RETURN 1
 
-
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-
-#define TARGET_ASM_OUTPUT_MI_THUNK m68k_output_mi_thunk
-
 /* Output assembler code for a block containing the constant parts
    of a trampoline, leaving space for the variable parts.  */
 
index 8d62bdd6fd1574f6260bd3f242d21f9ebcbe7221..0a5038c4dc79661866874b0a11069e181911a6d1 100644 (file)
@@ -84,38 +84,3 @@ Boston, MA 02111-1307, USA.  */
    dwarf unwind information. egcs doesn't try too hard to check internal
    configuration files...  */
 #define DWARF2_UNWIND_INFO 0
-
-
-/* TODO: TARGET_ASM_OUTPUT_MI_THUNK is busted. I need to figure out 
-   what bra func@PLTPC means under linux, and find the corresponding 
-   construction for our gas/pic setup.  */
-#if 0
-/* Taken from linux.h. Processor dependent optimized code to handle C++
-   multiple inheritance vtable lookup.  */
-
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)        \
-do {                                                                   \
-  if (DELTA > 0 && DELTA <= 8)                                         \
-    asm_fprintf (FILE, "\taddq.l %I%d,4(%Rsp)\n", DELTA);              \
-  else if (DELTA < 0 && DELTA >= -8)                                   \
-    asm_fprintf (FILE, "\tsubq.l %I%d,4(%Rsp)\n", -DELTA);             \
-  else                                                                 \
-    asm_fprintf (FILE, "\tadd.l %I%d,4(%Rsp)\n", DELTA);               \
-                                                                       \
-  if (flag_pic)                                                                \
-    {                                                                  \
-      fprintf (FILE, "\tbra.l ");                                      \
-      assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0));   \
-      fprintf (FILE, "@PLTPC\n");                                      \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      fprintf (FILE, "\tjmp ");                                                \
-      assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0));   \
-      fprintf (FILE, "\n");                                            \
-    }                                                                  \
-} while (0)
-#endif
-
index 0328df183d3f64e2743282218f96c61592a1d996..a6a4e3cddd8c6eff00aa48d0889e831bcfad02c0 100644 (file)
@@ -80,7 +80,6 @@ extern void mmix_asm_output_aligned_local
   PARAMS ((FILE *, const char *, int, int));
 extern void mmix_asm_declare_register_global
   PARAMS ((FILE *, tree, int, const char *));
-extern void mmix_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
 /* Need tree.h and rtl.h */
 # ifdef RTX_CODE
index e79e873f31690495d3855ed3d92ed25dd4762bbe..141ad2e56c30824a407905f1399c013192f0802b 100644 (file)
@@ -130,6 +130,8 @@ static void mmix_target_asm_function_prologue
 static void mmix_target_asm_function_end_prologue PARAMS ((FILE *));
 static void mmix_target_asm_function_epilogue
   PARAMS ((FILE *, HOST_WIDE_INT));
+static void mmix_asm_output_mi_thunk
+  PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
 
 /* Target structure macros.  Listed by node.  See `Using and Porting GCC'
@@ -162,6 +164,9 @@ static void mmix_target_asm_function_epilogue
 #undef TARGET_STRIP_NAME_ENCODING
 #define TARGET_STRIP_NAME_ENCODING  mmix_strip_name_encoding
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK mmix_asm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Functions that are expansions for target macros.
@@ -772,7 +777,7 @@ mmix_target_asm_function_epilogue (stream, locals_size)
 
 /* TARGET_ASM_OUTPUT_MI_THUNK.  */
 
-void
+static void
 mmix_asm_output_mi_thunk (stream, fndecl, delta, func)
      FILE * stream;
      tree fndecl ATTRIBUTE_UNUSED;
index 8001f0af78ef922a840087680f56effa09586718..05c053113e5294bf815c486909f4d792393406e4 100644 (file)
@@ -795,9 +795,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
 #define EPILOGUE_USES(REGNO) \
  ((REGNO) == MMIX_INCOMING_RETURN_ADDRESS_REGNUM)
 
-#define TARGET_ASM_OUTPUT_MI_THUNK mmix_asm_output_mi_thunk
-
-
 /* Node: Profiling */
 #define FUNCTION_PROFILER(FILE, LABELNO)       \
  mmix_function_profiler (FILE, LABELNO)
index bbdd6891e4bd9d7b2633629ab609df92f42ea83d..ca115fb55fc09ff103267b28469a584a60b0c237 100644 (file)
@@ -126,9 +126,6 @@ extern int eq_neq_comparison_operator PARAMS ((rtx, enum machine_mode));
 extern int insn_refs_are_delayed PARAMS ((rtx));
 #endif /* RTX_CODE */
 
-/* Prototype function used in macro TARGET_ASM_OUTPUT_MI_THUNK.  */
-extern void pa_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
-
 /* Prototype function used in macro CONST_OK_FOR_LETTER_P.  */
 extern int zdepi_cint_p PARAMS ((unsigned HOST_WIDE_INT));
 
@@ -163,6 +160,4 @@ extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode,
 extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
                                               enum machine_mode,
                                               tree, int));
-
-extern void pa_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 #endif /* TREE_CODE */
index 1aae00d3ec608221fa1ccedbf7f6f37fca2f5c53..48f4a38c5a27e2c73eaa64498e2b29c5f1a98ecf 100644 (file)
@@ -108,6 +108,7 @@ static void store_reg PARAMS ((int, int, int));
 static void store_reg_modify PARAMS ((int, int, int));
 static void load_reg PARAMS ((int, int, int));
 static void set_reg_plus_d PARAMS ((int, int, int, int));
+static void pa_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void pa_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
 static int pa_adjust_cost PARAMS ((rtx, rtx, rtx, int));
 static int pa_adjust_priority PARAMS ((rtx, int));
@@ -118,6 +119,8 @@ static void pa_encode_section_info PARAMS ((tree, int));
 static const char *pa_strip_name_encoding PARAMS ((const char *));
 static void pa_globalize_label PARAMS ((FILE *, const char *))
      ATTRIBUTE_UNUSED;
+static void pa_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
+
 
 /* Save the operands last given to a compare for use when we
    generate a scc or bcc insn.  */
@@ -194,6 +197,9 @@ static size_t n_deferred_plabels = 0;
 #undef TARGET_STRIP_NAME_ENCODING
 #define TARGET_STRIP_NAME_ENCODING pa_strip_name_encoding
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK pa_asm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 void
@@ -3148,7 +3154,7 @@ compute_frame_size (size, fregs_live)
    to do a "save" insn.  The decision about whether or not
    to do this is made in regclass.c.  */
 
-void
+static void
 pa_output_function_prologue (file, size)
      FILE *file;
      HOST_WIDE_INT size ATTRIBUTE_UNUSED;
@@ -6549,7 +6555,7 @@ is_function_label_plus_const (op)
 
 /* Output assembly code for a thunk to FUNCTION.  */
 
-void
+static void
 pa_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
      FILE *file;
      tree thunk_fndecl;
index 003838c6440101ba202b1d6ad970f17548383c3e..924571a10f76ed33c337fe3a83ebc54d2479d8b6 100644 (file)
@@ -897,8 +897,6 @@ extern GTY(()) rtx hppa_compare_op0;
 extern GTY(()) rtx hppa_compare_op1;
 extern enum cmp_type hppa_branch_type;
 
-#define TARGET_ASM_OUTPUT_MI_THUNK pa_asm_output_mi_thunk
-
 /* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than
    as assembly via FUNCTION_PROFILER.  Just output a local label.
    We can't use the function label because the GAS SOM target can't
index c85349df546ab577e33da29a0e31628174c49dac..09822bcabc370369f61d1064ba2d96c1e674fff9 100644 (file)
@@ -86,7 +86,6 @@ extern tree s390_build_va_list PARAMS ((void));
 extern rtx s390_function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
 extern void s390_va_start PARAMS ((tree, rtx));
 extern rtx s390_va_arg PARAMS ((tree, tree));
-extern void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 #endif /* RTX_CODE */
 #endif /* TREE_CODE */
 
index 420912787fd4dbf3a4922e2bae8a4e17c3e478c0..1b046d313878a61c09c3b21a8383c141544ccfb3 100644 (file)
@@ -54,6 +54,7 @@ static int s390_adjust_priority PARAMS ((rtx, int));
 static void s390_select_rtx_section PARAMS ((enum machine_mode, rtx, 
                                             unsigned HOST_WIDE_INT));
 static void s390_encode_section_info PARAMS ((tree, int));
+static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
 #undef  TARGET_ASM_ALIGNED_HI_OP
 #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
@@ -80,6 +81,9 @@ static void s390_encode_section_info PARAMS ((tree, int));
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO s390_encode_section_info
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK s390_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 extern int reload_completed;
@@ -5583,7 +5587,7 @@ s390_encode_section_info (decl, first)
     }
 }
 
-void
+static void
 s390_output_mi_thunk (file, thunk, delta, function)
      FILE *file;
      tree thunk ATTRIBUTE_UNUSED;
index e767aeb8a31c2ec149e43d5114abc317d415b7c6..37c6ade1f532fa6011c7bbcd5ad7ef19d1a92db4 100644 (file)
@@ -854,10 +854,6 @@ CUMULATIVE_ARGS;
 
 #define EXIT_IGNORE_STACK       1
 
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK s390_output_mi_thunk
-
 /* Addressing modes, and classification of registers for them.  */
 
 /* #define HAVE_POST_INCREMENT */
index 1a53cd14d0e9fe51b54f6e73d2cafd6693e53a9e..a4333df79ab527c07b98c6cd3c63a4f614d5a177 100644 (file)
@@ -63,5 +63,3 @@ Boston, MA 02111-1307, USA.  */
 #define DWARF2_UNWIND_INFO 0
 
 #undef ASM_PREFERRED_EH_DATA_FORMAT
-
-/* Default sparc.h does already define TARGET_ASM_OUTPUT_MI_THUNK */
index fc814a8fdbb5424e0b741850feb8c5af14ef7984..0aa6e58f7da983528c1d6198aebab97c60854db6 100644 (file)
@@ -123,6 +123,4 @@ extern int sparc_extra_constraint_check PARAMS ((rtx, int, int));
 extern int sparc_rtx_costs PARAMS ((rtx, enum rtx_code, enum rtx_code));
 #endif /* RTX_CODE */
 
-extern void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
-
 #endif /* __SPARC_PROTOS_H__ */
index e1a14c19e5f85ad285ca77b7094f52eddbae0c14..44fedc7b61c82d791a4f99873b1d8677652eb24b 100644 (file)
@@ -176,6 +176,7 @@ static void emit_soft_tfmode_cvt PARAMS ((enum rtx_code, rtx *));
 static void emit_hard_tfmode_operation PARAMS ((enum rtx_code, rtx *));
 
 static void sparc_encode_section_info PARAMS ((tree, int));
+static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 \f
 /* Option handling.  */
 
@@ -239,6 +240,9 @@ enum processor_type sparc_cpu;
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO sparc_encode_section_info
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Validate and override various options, and do some machine dependent
@@ -8448,7 +8452,7 @@ sparc_encode_section_info (decl, first)
 /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
    Used for C++ multiple inheritance.  */
 
-void
+static void
 sparc_output_mi_thunk (file, thunk_fndecl, delta, function)
      FILE *file;
      tree thunk_fndecl ATTRIBUTE_UNUSED;
index 8c3f70d5e9d274bfb3a7ea035b1a646973cb9017..53cb8756550469eae9a707422494c29a0d492a76 100644 (file)
@@ -2867,10 +2867,6 @@ do {                                                                     \
 #define ASM_OUTPUT_IDENT(FILE, NAME) \
   fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
 
-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
-   Used for C++ multiple inheritance.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk
-
 #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
   ((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '(' || (CHAR) == '_')
 
index 9f2ea2cababbe0bec2dc17b97368a5c04320405e..e957de1403c2adf314260ab02e7dfbf718fa2b04 100644 (file)
@@ -45,7 +45,6 @@ extern void    xstormy16_expand_builtin_va_start PARAMS ((tree, rtx));
 extern rtx     xstormy16_expand_builtin_va_arg PARAMS ((tree, tree));
 extern void    xstormy16_initialize_trampoline PARAMS ((rtx, rtx, rtx));
 extern rtx     xstormy16_function_value PARAMS ((tree, tree));
-extern void    xstormy16_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 #endif
 
 #ifdef RTX_CODE
index 58d7ae418a53a0ea36e9871817eb17f3294f9efb..de0cc9037875a55f726e09bfa32684893cac026a 100644 (file)
@@ -50,6 +50,8 @@ static rtx emit_addhi3_postreload PARAMS ((rtx, rtx, rtx));
 static void xstormy16_asm_out_constructor PARAMS ((rtx, int));
 static void xstormy16_asm_out_destructor PARAMS ((rtx, int));
 static void xstormy16_encode_section_info PARAMS ((tree, int));
+static void xstormy16_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
+                                                  tree));
 
 /* Define the information needed to generate branch and scc insns.  This is
    stored from the compare operation.  */
@@ -1380,7 +1382,7 @@ xstormy16_function_value (valtype, func)
    extracted from it.)  It might possibly be useful on some targets, but
    probably not.  */
 
-void
+static void
 xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
      FILE *file;
      tree thunk_fndecl ATTRIBUTE_UNUSED;
@@ -2031,4 +2033,7 @@ xstormy16_handle_interrupt_attribute (node, name, args, flags, no_add_attrs)
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO xstormy16_encode_section_info
 
+#undef TARGET_ASM_OUTPUT_MI_THUNK
+#define TARGET_ASM_OUTPUT_MI_THUNK xstormy16_asm_output_mi_thunk
+
 struct gcc_target targetm = TARGET_INITIALIZER;
index 8034f89a0b20e654148a2f5006a067de80e4e0a8..50a784c4fb5e022f925a8ee3542a63030bf17448 100644 (file)
@@ -1593,39 +1593,6 @@ enum reg_class
    You need not define this macro if you did not define
    `DELAY_SLOTS_FOR_EPILOGUE'.  */
 /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */
-
-/* A C compound statement that outputs the assembler code for a thunk function,
-   used to implement C++ virtual function calls with multiple inheritance.  The
-   thunk acts as a wrapper around a virtual function, adjusting the implicit
-   object parameter before handing control off to the real function.
-
-   First, emit code to add the integer DELTA to the location that contains the
-   incoming first argument.  Assume that this argument contains a pointer, and
-   is the one used to pass the `this' pointer in C++.  This is the incoming
-   argument *before* the function prologue, e.g. `%o0' on a sparc.  The
-   addition must preserve the values of all other incoming arguments.
-
-   After the addition, emit code to jump to FUNCTION, which is a
-   `FUNCTION_DECL'.  This is a direct pure jump, not a call, and does not touch
-   the return address.  Hence returning from FUNCTION will return to whoever
-   called the current `thunk'.
-
-   The effect must be as if @var{function} had been called directly
-   with the adjusted first argument.  This macro is responsible for
-   emitting all of the code for a thunk function;
-   TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE are
-   not invoked.
-
-   The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been
-   extracted from it.)  It might possibly be useful on some targets, but
-   probably not.
-
-   If you do not define this macro, the target-independent code in the C++
-   frontend will generate a less efficient heavyweight thunk that calls
-   FUNCTION instead of jumping to it.  The generic approach does not support
-   varargs.  */
-#define TARGET_ASM_OUTPUT_MI_THUNK xstormy16_asm_output_mi_thunk
-
 \f
 /* Generating Code for Profiling.  */
 
index 857aad7288325e91b019c09d9994cb73a5453bff..eb674c943f1f2af49ca213319524ff9ec9400872 100644 (file)
@@ -123,9 +123,9 @@ struct gcc_target
     /* Output the assembler code for a thunk function.  */
     void (* output_mi_thunk) PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
 
-    /* Output the assembler code for a thunk function with a vcall
-       offset.  */
-    void (* output_mi_vcall_thunk) PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
+    /* Output the assembler code for a thunk function with a vcall offset.  */
+    void (* output_mi_vcall_thunk) PARAMS ((FILE *, tree, HOST_WIDE_INT,
+                                           HOST_WIDE_INT, tree));
   } asm_out;
 
   /* Functions relating to instruction scheduling.  */