This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap failure with thunks change + patch to fix it.




--On Sunday, October 20, 2002 09:31:38 AM -0400 "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> wrote:

 > From: Richard Henderson <rth@redhat.com>
 >
 > On Sat, Oct 19, 2002 at 10:30:47AM -0400, Kaveh R. Ghazi wrote:
 > > Anyway, I'm not sure whether we should change everyone to standardize
 > > on int or long or HOST_WIDE_INT.  I chose int since that's what
 > > target.h uses and went through the other ports to fix ones that don't
 > > match.  (I *think* I got them all.)
 >
 > It should be HOST_WIDE_INT.  I was just about to go fix up the
 > signature of target.h and fix up the fallout, but if you want to do
 > it...
 > r~

Blech, but ok. :-)
I checked in this variant to your patch, and am running the massive
cross-compilation script again now.

Thanks,

--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com

2002-10-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mark Mitchell <mark@codesourcery.com>

* alpha-protos.h (alpha_output_mi_thunk_osf): Update signature to
match target.h.
* arm-protos.h, arm.c (arm_output_mi_thunk): Likewise.
* cris-protos.h, cris.c (cris_asm_output_mi_thunk): Likewise.
* frv-protos.h, frv.c (frv_asm_output_mi_thunk): Likewise.
* i386-protos.h, i386.c (x86_output_mi_vcall_thunk,
x86_output_mi_thunk): Likewise.
* i960-protos.h, i960.c (i960_output_mi_thunk): Likewise.
* ia64-protos.h, ia64.c (ia64_output_mi_thunk): Likewise.
* m68k-protos.h, m68k.c (m68k_output_mi_thunk): Likewise.
* mmix-protos.h, mmix.c (mmix_asm_output_mi_thunk): Likewise.
* rs6000-protos.h, rs6000.c (output_mi_thunk): Likewise.
* s390-protos.h, s390.c (s390_output_mi_thunk): Likewise.
* stormy16-protos.h, stormy16.c (xstormy16_asm_output_mi_thunk):
Likewise.
* vax-protos.h, vax.c (vax_output_mi_thunk): Likewise.

* target.h (gcc_target): Update output_mi_thunk and
output_mi_vcall_thunk to take a HOST_WIDE_INT delta and
vcall_index.

* config/alpha/alpha.c: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): Don't #undef it.
(TARGET_ASM_OUTPUT_MI_THUNK): #undef it.
* config/frv/frv.h (DEFAULT_VTABLE_THUNKS): Remove definition.
* config/i386/i386-protos.h (x86_output_mi_vcall_thunk): Update
signature.
* config/i386/i386.c (x86_output_mi_vcall_thunk): Likewise.
* config/i386/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Don't define.
(TARGET_ASM_OUTPUT_MI_THUNK): Do define.
* config/m68k/openbsd.h: Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.
* config/rs6000/rs6000.c (rs6000_ra_ever_killed): Remove #ifdef
ASM_OUTPUT_MI_THUNK and replace with check of targetm.

* doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Update signature.
(TARGET_ASM_OUTPU_MI_VCALL_THUNK): Likewise.

2002-10-20 Mark Mitchell <mark@codesourcery.com>

* method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
* optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
TARGET_ASM_OUTPUT_MI_THUNK in comments.

Index: target.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target.h,v
retrieving revision 1.38
diff -c -p -r1.38 target.h
*** target.h 18 Oct 2002 23:35:25 -0000 1.38
--- target.h 20 Oct 2002 18:48:45 -0000
*************** struct gcc_target
*** 121,131 ****
void (* destructor) PARAMS ((rtx, int));

/* Output the assembler code for a thunk function. */
! void (* output_mi_thunk) PARAMS ((FILE *, tree, int, tree));

/* Output the assembler code for a thunk function with a vcall
offset. */
! void (* output_mi_vcall_thunk) PARAMS ((FILE *, tree, int, int, tree));
} asm_out;

/* Functions relating to instruction scheduling. */
--- 121,131 ----
void (* destructor) PARAMS ((rtx, int));

/* 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));
} asm_out;

/* Functions relating to instruction scheduling. */
Index: config/alpha/alpha-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha-protos.h,v
retrieving revision 1.39
diff -c -p -r1.39 alpha-protos.h
*** config/alpha/alpha-protos.h 15 Aug 2002 05:04:26 -0000 1.39
--- config/alpha/alpha-protos.h 20 Oct 2002 18:48:46 -0000
*************** extern rtx function_arg PARAMS ((CUMULAT
*** 141,148 ****
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,
--- 141,147 ----
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: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.278
diff -c -p -r1.278 alpha.c
*** config/alpha/alpha.c 17 Oct 2002 20:58:48 -0000 1.278
--- config/alpha/alpha.c 20 Oct 2002 18:48:47 -0000
*************** alpha_sa_mask (imaskP, fmaskP)
*** 6700,6709 ****
unsigned int i;

/* Irritatingly, there are two kinds of thunks -- those created with
! ASM_OUTPUT_MI_THUNK and those with DECL_THUNK_P that go through
! the regular part of the compiler. In the ASM_OUTPUT_MI_THUNK case
! we don't have valid register life info, but assemble_start_function
! wants to output .frame and .mask directives. */
if (current_function_is_thunk && !no_new_pseudos)
{
*imaskP = 0;
--- 6700,6710 ----
unsigned int i;

/* Irritatingly, there are two kinds of thunks -- those created with
! TARGET_ASM_OUTPUT_MI_THUNK and those with DECL_THUNK_P that go
! through the regular part of the compiler. In the
! TARGET_ASM_OUTPUT_MI_THUNK case we don't have valid register life
! info, but assemble_start_function wants to output .frame and
! .mask directives. */
if (current_function_is_thunk && !no_new_pseudos)
{
*imaskP = 0;
Index: config/alpha/vms.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/vms.h,v
retrieving revision 1.67
diff -c -p -r1.67 vms.h
*** config/alpha/vms.h 29 Aug 2002 21:40:09 -0000 1.67
--- config/alpha/vms.h 20 Oct 2002 18:48:47 -0000
*************** do { \
*** 454,460 ****
sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))

/* ??? VMS uses different linkage. */
! #undef ASM_OUTPUT_MI_THUNK

#undef ASM_SPEC
#undef ASM_FINAL_SPEC
--- 454,460 ----
sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))

/* ??? VMS uses different linkage. */
! #undef TARGET_ASM_OUTPUT_MI_THUNK

#undef ASM_SPEC
#undef ASM_FINAL_SPEC
Index: config/arm/arm-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm-protos.h,v
retrieving revision 1.33
diff -c -p -r1.33 arm-protos.h
*** config/arm/arm-protos.h 18 Oct 2002 23:35:26 -0000 1.33
--- config/arm/arm-protos.h 20 Oct 2002 18:48:47 -0000
*************** extern int arm_dllexport_p PARAMS ((t
*** 194,200 ****
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, int, tree));
#endif

extern void arm_init_builtins PARAMS ((void));
--- 194,200 ----
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: config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.235
diff -c -p -r1.235 arm.c
*** config/arm/arm.c 18 Oct 2002 23:35:26 -0000 1.235
--- config/arm/arm.c 20 Oct 2002 18:48:49 -0000
*************** void
*** 11135,11141 ****
arm_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
int mi_delta = delta;
--- 11135,11141 ----
arm_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
int mi_delta = delta;
Index: config/cris/cris-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris-protos.h,v
retrieving revision 1.3
diff -c -p -r1.3 cris-protos.h
*** config/cris/cris-protos.h 19 May 2002 05:23:05 -0000 1.3
--- config/cris/cris-protos.h 20 Oct 2002 18:48:49 -0000
*************** extern rtx cris_expand_builtin_va_arg PA
*** 54,60 ****

#ifdef STDIO_INCLUDED
# ifdef TREE_CODE
! extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
# endif
#endif

--- 54,60 ----

#ifdef STDIO_INCLUDED
# ifdef TREE_CODE
! extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
# endif
#endif

Index: config/cris/cris.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/cris/cris.c,v
retrieving revision 1.29
diff -c -p -r1.29 cris.c
*** config/cris/cris.c 17 Sep 2002 23:10:04 -0000 1.29
--- config/cris/cris.c 20 Oct 2002 18:48:50 -0000
*************** cris_override_options ()
*** 2570,2592 ****
init_machine_status = cris_init_machine_status;
}

! /* The ASM_OUTPUT_MI_THUNK worker. */

void
cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl)
FILE *stream;
tree thunkdecl ATTRIBUTE_UNUSED;
! int delta;
tree funcdecl;
{
if (delta > 0)
! fprintf (stream, "\tadd%s %d,$%s\n",
! ADDITIVE_SIZE_MODIFIER (delta), delta,
! reg_names[CRIS_FIRST_ARG_REG]);
else if (delta < 0)
! fprintf (stream, "\tsub%s %d,$%s\n",
! ADDITIVE_SIZE_MODIFIER (-delta), -delta,
! reg_names[CRIS_FIRST_ARG_REG]);

if (flag_pic)
{
--- 2570,2596 ----
init_machine_status = cris_init_machine_status;
}

! /* The TARGET_ASM_OUTPUT_MI_THUNK worker. */

void
cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl)
FILE *stream;
tree thunkdecl ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree funcdecl;
{
if (delta > 0)
! {
! fprintf (stream, "\tadd%s ", ADDITIVE_SIZE_MODIFIER (delta));
! fprintf (stream, HOST_WIDE_INT_PRINT_DEC, delta);
! fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]);
! }
else if (delta < 0)
! {
! fprintf (stream, "\tsub%s ", ADDITIVE_SIZE_MODIFIER (-delta));
! fprintf (stream, HOST_WIDE_INT_PRINT_DEC, -delta);
! fprintf (stream, ",$%s\n", reg_names[CRIS_FIRST_ARG_REG]);
! }

if (flag_pic)
{
Index: config/d30v/d30v.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/d30v/d30v.h,v
retrieving revision 1.71
diff -c -p -r1.71 d30v.h
*** config/d30v/d30v.h 24 Sep 2002 12:48:52 -0000 1.71
--- config/d30v/d30v.h 20 Oct 2002 18:48:51 -0000
*************** typedef struct d30v_stack {
*** 1908,1914 ****
frontend will generate a less efficient heavyweight thunk that calls
FUNCTION instead of jumping to it. The generic approach does not support
varargs. */
! /* #define 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. */
--- 1908,1914 ----
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. */
Index: config/frv/frv-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv-protos.h,v
retrieving revision 1.2
diff -c -p -r1.2 frv-protos.h
*** config/frv/frv-protos.h 4 Sep 2002 20:56:33 -0000 1.2
--- config/frv/frv-protos.h 20 Oct 2002 18:48:51 -0000
*************** extern rtx frv_index_memory PARAMS ((r
*** 115,122 ****
int));

#ifdef TREE_CODE
! extern void frv_asm_output_mi_thunk PARAMS ((FILE *, tree, long,
! tree));
#endif /* TREE_CODE */

extern const char *frv_asm_output_opcode
--- 115,121 ----
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
Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.11
diff -c -p -r1.11 frv.c
*** config/frv/frv.c 28 Sep 2002 15:29:38 -0000 1.11
--- config/frv/frv.c 20 Oct 2002 18:48:53 -0000
*************** void
*** 1870,1876 ****
frv_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! long delta;
tree function;
{
const char *name_func = XSTR (XEXP (DECL_RTL (function), 0), 0);
--- 1870,1876 ----
frv_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
const char *name_func = XSTR (XEXP (DECL_RTL (function), 0), 0);
*************** frv_asm_output_mi_thunk (file, thunk_fnd
*** 1880,1891 ****

/* Do the add using an addi if possible */
if (IN_RANGE_P (delta, -2048, 2047))
! fprintf (file, "\taddi %s,#%ld,%s\n", name_arg0, delta, name_arg0);
else
{
const char *name_add = reg_names[TEMP_REGNO];
! fprintf (file, "\tsethi%s #hi(%ld),%s\n", parallel, delta, name_add);
! fprintf (file, "\tsetlo #lo(%ld),%s\n", delta, name_add);
fprintf (file, "\tadd %s,%s,%s\n", name_add, name_arg0, name_arg0);
}

--- 1880,1895 ----

/* Do the add using an addi if possible */
if (IN_RANGE_P (delta, -2048, 2047))
! fprintf (file, "\taddi %s,#%d,%s\n", name_arg0, (int) delta, name_arg0);
else
{
const char *name_add = reg_names[TEMP_REGNO];
! fprintf (file, "\tsethi%s #hi(", parallel);
! fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
! fprintf (file, "),%s\n", name_add);
! fprintf (file, "\tsetlo #lo(");
! fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
! fprintf (file, "),%s\n", name_add);
fprintf (file, "\tadd %s,%s,%s\n", name_add, name_arg0, name_arg0);
}

Index: config/frv/frv.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.h,v
retrieving revision 1.11
diff -c -p -r1.11 frv.h
*** config/frv/frv.h 18 Oct 2002 23:35:28 -0000 1.11
--- config/frv/frv.h 20 Oct 2002 18:48:54 -0000
*************** extern int g_switch_set; /* whe
*** 748,765 ****
Defined in svr4.h. */
#define PCC_BITFIELD_TYPE_MATTERS 1

- /* GNU CC supports two ways of implementing C++ vtables: traditional or with
- so-called "thunks". The flag `-fvtable-thunk' chooses between them. Define
- this macro to be a C expression for the default value of that flag. If
- `DEFAULT_VTABLE_THUNKS' is 0, GNU CC uses the traditional implementation by
- default. The "thunk" implementation is more efficient (especially if you
- have provided an implementation of `ASM_OUTPUT_MI_THUNK', but is not binary
- compatible with code compiled using the traditional implementation. If you
- are writing a new ports, define `DEFAULT_VTABLE_THUNKS' to 1.
-
- If you do not define this macro, the default for `-fvtable-thunk' is 0. */
- #define DEFAULT_VTABLE_THUNKS 1
-

/* Layout of Source Language Data Types. */

--- 748,753 ----
Index: config/i386/i386-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-protos.h,v
retrieving revision 1.81
diff -c -p -r1.81 i386-protos.h
*** config/i386/i386-protos.h 18 Oct 2002 23:35:29 -0000 1.81
--- config/i386/i386-protos.h 20 Oct 2002 18:48:54 -0000
*************** extern tree ix86_handle_shared_attribute
*** 211,218 ****
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, int, tree));
! extern void x86_output_mi_vcall_thunk PARAMS ((FILE *, tree, int, int, tree));
extern int x86_field_alignment PARAMS ((tree, int));
#endif

--- 211,218 ----
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: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.475
diff -c -p -r1.475 i386.c
*** config/i386/i386.c 19 Oct 2002 22:34:16 -0000 1.475
--- config/i386/i386.c 20 Oct 2002 18:48:56 -0000
*************** void
*** 13906,13913 ****
x86_output_mi_vcall_thunk (file, thunk, delta, vcall_index, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
! int vcall_index;
tree function;
{
rtx xops[3];
--- 13906,13913 ----
x86_output_mi_vcall_thunk (file, thunk, delta, vcall_index, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
! HOST_WIDE_INT vcall_index;
tree function;
{
rtx xops[3];
*************** void
*** 14010,14016 ****
x86_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk;
! int delta;
tree function;
{
x86_output_mi_vcall_thunk (file, thunk, delta, /*vcall_index=*/0,
--- 14010,14016 ----
x86_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk;
! HOST_WIDE_INT delta;
tree function;
{
x86_output_mi_vcall_thunk (file, thunk, delta, /*vcall_index=*/0,
Index: config/i386/openbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/openbsd.h,v
retrieving revision 1.16
diff -c -p -r1.16 openbsd.h
*** config/i386/openbsd.h 29 Jun 2002 09:10:04 -0000 1.16
--- config/i386/openbsd.h 20 Oct 2002 18:48:56 -0000
*************** Boston, MA 02111-1307, USA. */
*** 97,103 ****
#undef ASM_PREFERRED_EH_DATA_FORMAT


! /* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */

#undef ASM_COMMENT_START
#define ASM_COMMENT_START ";#"
--- 97,103 ----
#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: config/i960/i960-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i960/i960-protos.h,v
retrieving revision 1.8
diff -c -p -r1.8 i960-protos.h
*** config/i960/i960-protos.h 18 Oct 2002 23:35:30 -0000 1.8
--- config/i960/i960-protos.h 20 Oct 2002 18:48:56 -0000
*************** extern void i960_setup_incoming_varargs
*** 86,92 ****
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, int, tree));
#endif /* TREE_CODE */

extern int process_pragma PARAMS ((int(*)(void), void(*)(int), const char *));
--- 86,92 ----
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: config/i960/i960.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i960/i960.c,v
retrieving revision 1.46
diff -c -p -r1.46 i960.c
*** config/i960/i960.c 18 Oct 2002 23:35:30 -0000 1.46
--- config/i960/i960.c 20 Oct 2002 18:48:56 -0000
*************** void
*** 2829,2835 ****
i960_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
int d = delta;
--- 2829,2835 ----
i960_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
int d = delta;
Index: config/i960/i960.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i960/i960.h,v
retrieving revision 1.67
diff -c -p -r1.67 i960.h
*** config/i960/i960.h 18 Oct 2002 23:35:30 -0000 1.67
--- config/i960/i960.h 20 Oct 2002 18:48:57 -0000
*************** extern int rtx_equal_function_value_matt
*** 1466,1469 ****

/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
! #define ASM_OUTPUT_MI_THUNK i960_output_mi_thunk
--- 1466,1469 ----

/* 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: config/ia64/ia64-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64-protos.h,v
retrieving revision 1.47
diff -c -p -r1.47 ia64-protos.h
*** config/ia64/ia64-protos.h 18 Oct 2002 23:35:30 -0000 1.47
--- config/ia64/ia64-protos.h 20 Oct 2002 18:48:57 -0000
*************** extern int ia64_function_arg_pass_by_ref
*** 121,127 ****
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, int, tree));
#endif /* TREE_CODE */

extern int ia64_register_move_cost PARAMS((enum machine_mode, enum reg_class,
--- 121,127 ----
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: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.189
diff -c -p -r1.189 ia64.c
*** config/ia64/ia64.c 18 Oct 2002 23:35:30 -0000 1.189
--- config/ia64/ia64.c 20 Oct 2002 18:48:58 -0000
*************** void
*** 8163,8169 ****
ia64_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
if (CONST_OK_FOR_I (delta))
--- 8163,8169 ----
ia64_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
if (CONST_OK_FOR_I (delta))
Index: config/m68k/m68k-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k-protos.h,v
retrieving revision 1.5
diff -c -p -r1.5 m68k-protos.h
*** config/m68k/m68k-protos.h 18 Oct 2002 23:35:31 -0000 1.5
--- config/m68k/m68k-protos.h 20 Oct 2002 18:48:58 -0000
*************** extern rtx legitimize_pic_address PARAMS
*** 65,71 ****
#endif /* RTX_CODE */

#ifdef TREE_CODE
! extern void m68k_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
#endif /* TREE_CODE */

extern int flags_in_68881 PARAMS ((void));
--- 65,71 ----
#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));
Index: config/m68k/m68k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.c,v
retrieving revision 1.70
diff -c -p -r1.70 m68k.c
*** config/m68k/m68k.c 18 Oct 2002 23:35:31 -0000 1.70
--- config/m68k/m68k.c 20 Oct 2002 18:48:59 -0000
*************** void
*** 3840,3854 ****
m68k_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
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)
{
--- 3840,3858 ----
m68k_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT d;
tree function;
{
if (delta > 0 && delta <= 8)
! asm_fprintf (file, "\taddq.l %I%d,4(%Rsp)\n", (int) delta);
else if (delta < 0 && delta >= -8)
! asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta);
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)
{
Index: config/m68k/openbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/openbsd.h,v
retrieving revision 1.5
diff -c -p -r1.5 openbsd.h
*** config/m68k/openbsd.h 29 Aug 2002 21:40:13 -0000 1.5
--- config/m68k/openbsd.h 20 Oct 2002 18:48:59 -0000
***************
*** 1,5 ****
/* Configuration file for an m68k OpenBSD target.
! Copyright (C) 1999 Free Software Foundation, Inc.

This file is part of GNU CC.

--- 1,5 ----
/* Configuration file for an m68k OpenBSD target.
! Copyright (C) 1999, 2002 Free Software Foundation, Inc.

This file is part of GNU CC.

*************** Boston, MA 02111-1307, USA. */
*** 86,92 ****
#define DWARF2_UNWIND_INFO 0


! /* TODO: 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
--- 86,92 ----
#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
*************** Boston, MA 02111-1307, USA. */
*** 95,101 ****

/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
! #define 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); \
--- 95,101 ----

/* 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); \
Index: config/mmix/mmix-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix-protos.h,v
retrieving revision 1.17
diff -c -p -r1.17 mmix-protos.h
*** config/mmix/mmix-protos.h 21 Aug 2002 02:41:49 -0000 1.17
--- config/mmix/mmix-protos.h 20 Oct 2002 18:48:59 -0000
*************** extern void mmix_asm_output_aligned_loca
*** 80,86 ****
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, int, tree));

/* Need tree.h and rtl.h */
# ifdef RTX_CODE
--- 80,86 ----
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: config/mmix/mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.42
diff -c -p -r1.42 mmix.c
*** config/mmix/mmix.c 28 Sep 2002 15:29:44 -0000 1.42
--- config/mmix/mmix.c 20 Oct 2002 18:48:59 -0000
*************** mmix_target_asm_function_epilogue (strea
*** 770,782 ****
fputc ('\n', stream);
}

! /* ASM_OUTPUT_MI_THUNK. */

void
mmix_asm_output_mi_thunk (stream, fndecl, delta, func)
FILE * stream;
tree fndecl ATTRIBUTE_UNUSED;
! int delta;
tree func;
{
/* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM,
--- 770,782 ----
fputc ('\n', stream);
}

! /* TARGET_ASM_OUTPUT_MI_THUNK. */

void
mmix_asm_output_mi_thunk (stream, fndecl, delta, func)
FILE * stream;
tree fndecl ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree func;
{
/* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM,
*************** mmix_asm_output_mi_thunk (stream, fndecl
*** 785,793 ****
const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM];

if (delta >= 0 && delta < 65536)
! fprintf (stream, "\tINCL %s,%d\n", regname, delta);
else if (delta < 0 && delta >= -255)
! fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, -delta);
else
{
mmix_output_register_setting (stream, 255, delta, 1);
--- 785,793 ----
const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM];

if (delta >= 0 && delta < 65536)
! fprintf (stream, "\tINCL %s,%d\n", regname, (int)delta);
else if (delta < 0 && delta >= -255)
! fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, (int)-delta);
else
{
mmix_output_register_setting (stream, 255, delta, 1);
Index: config/pa/pa-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-protos.h,v
retrieving revision 1.16
diff -c -p -r1.16 pa-protos.h
*** config/pa/pa-protos.h 16 Jul 2002 20:59:03 -0000 1.16
--- config/pa/pa-protos.h 20 Oct 2002 18:49:00 -0000
*************** extern int eq_neq_comparison_operator PA
*** 126,132 ****
extern int insn_refs_are_delayed PARAMS ((rtx));
#endif /* RTX_CODE */

! /* Prototype function used in macro 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. */
--- 126,132 ----
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. */
Index: config/rs6000/rs6000-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000-protos.h,v
retrieving revision 1.44
diff -c -p -r1.44 rs6000-protos.h
*** config/rs6000/rs6000-protos.h 16 Sep 2002 17:22:14 -0000 1.44
--- config/rs6000/rs6000-protos.h 20 Oct 2002 18:49:00 -0000
*************** extern void setup_incoming_varargs PARAM
*** 150,156 ****
enum machine_mode, tree,
int *, int));
extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
! extern void output_mi_thunk PARAMS ((FILE *, tree, int, tree));
extern int function_ok_for_sibcall PARAMS ((tree));
#ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
--- 150,156 ----
enum machine_mode, tree,
int *, int));
extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
! extern void output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
extern int function_ok_for_sibcall PARAMS ((tree));
#ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.391
diff -c -p -r1.391 rs6000.c
*** config/rs6000/rs6000.c 16 Oct 2002 23:08:43 -0000 1.391
--- config/rs6000/rs6000.c 20 Oct 2002 18:49:02 -0000
*************** rs6000_ra_ever_killed ()
*** 9456,9465 ****
rtx reg;
rtx insn;

! #ifdef ASM_OUTPUT_MI_THUNK
! if (current_function_is_thunk)
return 0;
! #endif
/* regs_ever_live has LR marked as used if any sibcalls are present,
but this should not force saving and restoring in the
pro/epilogue. Likewise, reg_set_between_p thinks a sibcall
--- 9456,9464 ----
rtx reg;
rtx insn;

! if (targetm.asm_out.output_mi_thunk && current_function_is_thunk)
return 0;
!
/* regs_ever_live has LR marked as used if any sibcalls are present,
but this should not force saving and restoring in the
pro/epilogue. Likewise, reg_set_between_p thinks a sibcall
*************** void
*** 11236,11242 ****
output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
const char *this_reg =
--- 11235,11241 ----
output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
const char *this_reg =
*************** output_mi_thunk (file, thunk_fndecl, del
*** 11254,11262 ****
if (delta >= -32768 && delta <= 32767)
{
if (! TARGET_NEW_MNEMONICS)
! fprintf (file, "\tcal %s,%d(%s)\n", this_reg, delta, this_reg);
else
! fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, delta);
}

/* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */
--- 11253,11261 ----
if (delta >= -32768 && delta <= 32767)
{
if (! TARGET_NEW_MNEMONICS)
! fprintf (file, "\tcal %s,%d(%s)\n", this_reg, (int) delta, this_reg);
else
! fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, (int) delta);
}

/* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */
*************** output_mi_thunk (file, thunk_fndecl, del
*** 11266,11272 ****
/* Large constants that can be done by one addis instruction. */
else if ((delta & 0xffff) == 0)
asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg,
! delta >> 16);

/* 32-bit constants that can be done by an add and addis instruction. */
else
--- 11265,11271 ----
/* Large constants that can be done by one addis instruction. */
else if ((delta & 0xffff) == 0)
asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg,
! (int) (delta >> 16));

/* 32-bit constants that can be done by an add and addis instruction. */
else
Index: config/s390/s390-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390-protos.h,v
retrieving revision 1.16
diff -c -p -r1.16 s390-protos.h
*** config/s390/s390-protos.h 18 Oct 2002 23:35:34 -0000 1.16
--- config/s390/s390-protos.h 20 Oct 2002 18:49:02 -0000
*************** extern tree s390_build_va_list PARAMS ((
*** 86,92 ****
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, int, tree));
#endif /* RTX_CODE */
#endif /* TREE_CODE */

--- 86,92 ----
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: config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.59
diff -c -p -r1.59 s390.c
*** config/s390/s390.c 18 Oct 2002 23:35:34 -0000 1.59
--- config/s390/s390.c 20 Oct 2002 18:49:03 -0000
*************** void
*** 5587,5593 ****
s390_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
if (TARGET_64BIT)
--- 5587,5593 ----
s390_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
if (TARGET_64BIT)
Index: config/sparc/openbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/openbsd.h,v
retrieving revision 1.6
diff -c -p -r1.6 openbsd.h
*** config/sparc/openbsd.h 29 Aug 2002 21:40:18 -0000 1.6
--- config/sparc/openbsd.h 20 Oct 2002 18:49:03 -0000
***************
*** 1,5 ****
/* Configuration file for sparc OpenBSD target.
! Copyright (C) 1999 Free Software Foundation, Inc.

This file is part of GNU CC.

--- 1,5 ----
/* Configuration file for sparc OpenBSD target.
! Copyright (C) 1999, 2002 Free Software Foundation, Inc.

This file is part of GNU CC.

*************** Boston, MA 02111-1307, USA. */
*** 64,67 ****

#undef ASM_PREFERRED_EH_DATA_FORMAT

! /* Default sparc.h does already define ASM_OUTPUT_MI_THUNK */
--- 64,67 ----

#undef ASM_PREFERRED_EH_DATA_FORMAT

! /* Default sparc.h does already define TARGET_ASM_OUTPUT_MI_THUNK */
Index: config/stormy16/stormy16-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16-protos.h,v
retrieving revision 1.7
diff -c -p -r1.7 stormy16-protos.h
*** config/stormy16/stormy16-protos.h 16 Jul 2002 20:59:07 -0000 1.7
--- config/stormy16/stormy16-protos.h 20 Oct 2002 18:49:03 -0000
*************** extern void xstormy16_expand_builtin_
*** 45,51 ****
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, int, tree));
#endif

#ifdef RTX_CODE
--- 45,51 ----
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: config/stormy16/stormy16.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.c,v
retrieving revision 1.28
diff -c -p -r1.28 stormy16.c
*** config/stormy16/stormy16.c 18 Sep 2002 11:43:43 -0000 1.28
--- config/stormy16/stormy16.c 20 Oct 2002 18:49:03 -0000
*************** void
*** 1384,1390 ****
xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
int regnum = FIRST_ARGUMENT_REGISTER;
--- 1384,1390 ----
xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
int regnum = FIRST_ARGUMENT_REGISTER;
*************** xstormy16_asm_output_mi_thunk (file, thu
*** 1393,1399 ****
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function))))
regnum += 1;

! fprintf (file, "\tadd %s,#0x%x\n", reg_names[regnum], (delta) & 0xFFFF);
fputs ("\tjmpf ", file);
assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
putc ('\n', file);
--- 1393,1399 ----
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function))))
regnum += 1;

! fprintf (file, "\tadd %s,#0x%x\n", reg_names[regnum], (int) delta & 0xFFFF);
fputs ("\tjmpf ", file);
assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
putc ('\n', file);
Index: config/vax/vax-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/vax/vax-protos.h,v
retrieving revision 1.6
diff -c -p -r1.6 vax-protos.h
*** config/vax/vax-protos.h 18 Oct 2002 23:35:37 -0000 1.6
--- config/vax/vax-protos.h 20 Oct 2002 18:49:03 -0000
*************** extern int check_float_value PARAMS ((en
*** 36,42 ****

#ifdef TREE_CODE
extern void vms_check_external PARAMS ((tree, const char *, int));
! extern void vax_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
#endif /* TREE_CODE */

extern void vms_flush_pending_externals PARAMS ((FILE *));
--- 36,42 ----

#ifdef TREE_CODE
extern void vms_check_external PARAMS ((tree, const char *, int));
! extern void vax_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif /* TREE_CODE */

extern void vms_flush_pending_externals PARAMS ((FILE *));
Index: config/vax/vax.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.c,v
retrieving revision 1.36
diff -c -p -r1.36 vax.c
*** config/vax/vax.c 18 Oct 2002 23:35:37 -0000 1.36
--- config/vax/vax.c 20 Oct 2002 18:49:03 -0000
*************** void
*** 997,1007 ****
vax_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! int delta;
tree function;
{
fprintf (file, "\t.word 0x0ffc\n");
! asm_fprintf (file, "\taddl2 $%d,4(%Rap)\n", delta);
fprintf (file, "\tjmp ");
assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
fprintf (file, "+2\n");
--- 997,1009 ----
vax_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
! HOST_WIDE_INT delta;
tree function;
{
fprintf (file, "\t.word 0x0ffc\n");
! fprintf (file, "\taddl2 $");
! fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
! asm_fprintf (file, ",4(%Rap)\n");
fprintf (file, "\tjmp ");
assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
fprintf (file, "+2\n");
Index: cp/method.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v
retrieving revision 1.234
diff -c -p -r1.234 method.c
*** cp/method.c 18 Oct 2002 23:35:39 -0000 1.234
--- cp/method.c 20 Oct 2002 18:49:09 -0000
*************** use_thunk (thunk_fndecl, emit_p)
*** 422,430 ****
assemble_start_function (thunk_fndecl, fnname);
if (targetm.asm_out.output_mi_vcall_thunk)
{
! int vcall_value = (vcall_offset
! ? tree_low_cst (vcall_offset, /*pos=*/0)
! : 0);
targetm.asm_out.output_mi_vcall_thunk (asm_out_file,
thunk_fndecl, delta,
vcall_value,
--- 422,433 ----
assemble_start_function (thunk_fndecl, fnname);
if (targetm.asm_out.output_mi_vcall_thunk)
{
! HOST_WIDE_INT vcall_value;
!
! if (vcall_offset)
! vcall_value = tree_low_cst (vcall_offset, /*pos=*/0);
! else
! vcall_value = 0;
targetm.asm_out.output_mi_vcall_thunk (asm_out_file,
thunk_fndecl, delta,
vcall_value,
Index: cp/optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/optimize.c,v
retrieving revision 1.84
diff -c -p -r1.84 optimize.c
*** cp/optimize.c 21 Sep 2002 12:51:55 -0000 1.84
--- cp/optimize.c 20 Oct 2002 18:49:09 -0000
***************
*** 1,5 ****
/* Perform optimizations on tree structure.
! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Mark Michell (mark@codesourcery.com).

This file is part of GNU CC.
--- 1,5 ----
/* Perform optimizations on tree structure.
! Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Mark Michell (mark@codesourcery.com).

This file is part of GNU CC.
*************** optimize_function (fn)
*** 64,70 ****
/* We do not inline thunks, as (a) the backend tries to optimize
the call to the thunkee, (b) tree based inlining breaks that
optimization, (c) virtual functions are rarely inlineable,
! and (d) ASM_OUTPUT_MI_THUNK is there to DTRT anyway. */
&& !DECL_THUNK_P (fn))
{
optimize_inline_calls (fn);
--- 64,70 ----
/* We do not inline thunks, as (a) the backend tries to optimize
the call to the thunkee, (b) tree based inlining breaks that
optimization, (c) virtual functions are rarely inlineable,
! and (d) TARGET_ASM_OUTPUT_MI_THUNK is there to DTRT anyway. */
&& !DECL_THUNK_P (fn))
{
optimize_inline_calls (fn);
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.178
diff -c -p -r1.178 tm.texi
*** doc/tm.texi 18 Oct 2002 23:35:39 -0000 1.178
--- doc/tm.texi 20 Oct 2002 18:49:12 -0000
*************** You need not define this macro if you di
*** 4154,4160 ****
@end table

@findex TARGET_ASM_OUTPUT_MI_THUNK
! @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, int @var{delta}, tree @var{function})
A function 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,
--- 4154,4160 ----
@end table

@findex TARGET_ASM_OUTPUT_MI_THUNK
! @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, tree @var{function})
A function 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,
*************** not support varargs.
*** 4189,4195 ****
@end deftypefn

@findex TARGET_ASM_OUTPUT_MI_VCALL_THUNK
! @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, int @var{delta}, int @var{vcall_offset}, tree @var{function})
A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if
@var{vcall_offset} is non-zero, an additional adjustment should be made
after adding @code{delta}. In particular, if @var{p} is the
--- 4189,4195 ----
@end deftypefn

@findex TARGET_ASM_OUTPUT_MI_VCALL_THUNK
! @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, int @var{vcall_offset}, tree @var{function})
A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if
@var{vcall_offset} is non-zero, an additional adjustment should be made
after adding @code{delta}. In particular, if @var{p} is the


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]