This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure with thunks change + patch to fix it.
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: rth at redhat dot com
- Cc: davem at redhat dot com, gcc-patches at gcc dot gnu dot org, geoffk at geoffk dot org, mark at codesourcery dot com
- Date: Sun, 20 Oct 2002 09:31:38 -0400 (EDT)
- Subject: Re: Bootstrap failure with thunks change + patch to fix it.
- References: <200210191430.KAA05152@caip.rutgers.edu> <20021019220113.GB30160@redhat.com>
> 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 bootstrapped this on sparc-sun-solaris2.7 with c,c++ only, it
successfully builds libstdc++-v3 and there's no initialization warning
from sparc.c. Before I do all the cross-compile tests, I wanted to
get it out for review because of note#2 below:
1. To avoid too many of the ugly HOST_WIDE_INT_PRINT_DEC splitups, I
used casts where the range of delta was previously checked and fit
in an int. Check it and let me know if I went too far or not far
enough in the various cases below.
2. The rs6000.c output_mi_thunk does something wierd. I just don't
get it:
[...]
/* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */
else if (TARGET_64BIT && (delta < -2147483647 - 1 || delta > 2147483647))
abort ();
/* 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
[...]
What should I do for these two clauses?
Thanks,
--Kaveh
2002-10-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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.
diff -rup orig/egcc-CVS20021019/gcc/config/alpha/alpha-protos.h egcc-CVS20021019/gcc/config/alpha/alpha-protos.h
--- orig/egcc-CVS20021019/gcc/config/alpha/alpha-protos.h 2002-08-15 07:00:26.000000000 -0400
+++ egcc-CVS20021019/gcc/config/alpha/alpha-protos.h 2002-10-19 22:51:51.431566846 -0400
@@ -141,8 +141,7 @@ extern rtx function_arg PARAMS ((CUMULAT
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));
+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,
diff -rup orig/egcc-CVS20021019/gcc/config/arm/arm-protos.h egcc-CVS20021019/gcc/config/arm/arm-protos.h
--- orig/egcc-CVS20021019/gcc/config/arm/arm-protos.h 2002-10-18 23:11:30.000000000 -0400
+++ egcc-CVS20021019/gcc/config/arm/arm-protos.h 2002-10-19 21:42:28.443824769 -0400
@@ -194,7 +194,7 @@ extern int arm_dllexport_p PARAMS ((t
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));
+extern void arm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif
extern void arm_init_builtins PARAMS ((void));
diff -rup orig/egcc-CVS20021019/gcc/config/arm/arm.c egcc-CVS20021019/gcc/config/arm/arm.c
--- orig/egcc-CVS20021019/gcc/config/arm/arm.c 2002-10-18 23:11:31.000000000 -0400
+++ egcc-CVS20021019/gcc/config/arm/arm.c 2002-10-19 21:41:10.890724238 -0400
@@ -11135,7 +11135,7 @@ void
arm_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
int mi_delta = delta;
diff -rup orig/egcc-CVS20021019/gcc/config/cris/cris-protos.h egcc-CVS20021019/gcc/config/cris/cris-protos.h
--- orig/egcc-CVS20021019/gcc/config/cris/cris-protos.h 2002-05-19 07:00:59.000000000 -0400
+++ egcc-CVS20021019/gcc/config/cris/cris-protos.h 2002-10-19 21:48:58.457928674 -0400
@@ -54,7 +54,7 @@ extern rtx cris_expand_builtin_va_arg PA
#ifdef STDIO_INCLUDED
# ifdef TREE_CODE
-extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
+extern void cris_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
# endif
#endif
diff -rup orig/egcc-CVS20021019/gcc/config/cris/cris.c egcc-CVS20021019/gcc/config/cris/cris.c
--- orig/egcc-CVS20021019/gcc/config/cris/cris.c 2002-09-17 22:36:59.000000000 -0400
+++ egcc-CVS20021019/gcc/config/cris/cris.c 2002-10-19 21:52:21.059786475 -0400
@@ -2576,17 +2576,21 @@ void
cris_asm_output_mi_thunk (stream, thunkdecl, delta, funcdecl)
FILE *stream;
tree thunkdecl ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_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]);
+ {
+ 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 %d,$%s\n",
- ADDITIVE_SIZE_MODIFIER (-delta), -delta,
- reg_names[CRIS_FIRST_ARG_REG]);
+ {
+ 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)
{
diff -rup orig/egcc-CVS20021019/gcc/config/frv/frv-protos.h egcc-CVS20021019/gcc/config/frv/frv-protos.h
--- orig/egcc-CVS20021019/gcc/config/frv/frv-protos.h 2002-09-04 16:54:39.000000000 -0400
+++ egcc-CVS20021019/gcc/config/frv/frv-protos.h 2002-10-19 22:49:47.112658504 -0400
@@ -115,8 +115,7 @@ extern rtx frv_index_memory PARAMS ((r
int));
#ifdef TREE_CODE
-extern void frv_asm_output_mi_thunk PARAMS ((FILE *, tree, long,
- tree));
+extern void frv_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif /* TREE_CODE */
extern const char *frv_asm_output_opcode
diff -rup orig/egcc-CVS20021019/gcc/config/frv/frv.c egcc-CVS20021019/gcc/config/frv/frv.c
--- orig/egcc-CVS20021019/gcc/config/frv/frv.c 2002-09-28 16:00:14.000000000 -0400
+++ egcc-CVS20021019/gcc/config/frv/frv.c 2002-10-19 22:57:52.269829314 -0400
@@ -1870,7 +1870,7 @@ void
frv_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
- long delta;
+ HOST_WIDE_INT delta;
tree function;
{
const char *name_func = XSTR (XEXP (DECL_RTL (function), 0), 0);
@@ -1880,12 +1880,16 @@ frv_asm_output_mi_thunk (file, thunk_fnd
/* 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);
+ 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(%ld),%s\n", parallel, delta, name_add);
- fprintf (file, "\tsetlo #lo(%ld),%s\n", delta, name_add);
+ 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);
}
diff -rup orig/egcc-CVS20021019/gcc/config/i386/i386-protos.h egcc-CVS20021019/gcc/config/i386/i386-protos.h
--- orig/egcc-CVS20021019/gcc/config/i386/i386-protos.h 2002-10-18 23:11:34.000000000 -0400
+++ egcc-CVS20021019/gcc/config/i386/i386-protos.h 2002-10-19 22:27:59.649022260 -0400
@@ -211,8 +211,8 @@ extern tree ix86_handle_shared_attribute
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 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, int, tree));
extern int x86_field_alignment PARAMS ((tree, int));
#endif
diff -rup orig/egcc-CVS20021019/gcc/config/i386/i386.c egcc-CVS20021019/gcc/config/i386/i386.c
--- orig/egcc-CVS20021019/gcc/config/i386/i386.c 2002-10-19 21:17:29.000000000 -0400
+++ egcc-CVS20021019/gcc/config/i386/i386.c 2002-10-19 22:27:43.220577801 -0400
@@ -13906,7 +13906,7 @@ void
x86_output_mi_vcall_thunk (file, thunk, delta, vcall_index, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
int vcall_index;
tree function;
{
@@ -14010,7 +14010,7 @@ void
x86_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
x86_output_mi_vcall_thunk (file, thunk, delta, /*vcall_index=*/0,
diff -rup orig/egcc-CVS20021019/gcc/config/i960/i960-protos.h egcc-CVS20021019/gcc/config/i960/i960-protos.h
--- orig/egcc-CVS20021019/gcc/config/i960/i960-protos.h 2002-10-18 23:11:35.000000000 -0400
+++ egcc-CVS20021019/gcc/config/i960/i960-protos.h 2002-10-19 22:30:13.106890419 -0400
@@ -86,7 +86,7 @@ extern void i960_setup_incoming_varargs
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));
+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 *));
diff -rup orig/egcc-CVS20021019/gcc/config/i960/i960.c egcc-CVS20021019/gcc/config/i960/i960.c
--- orig/egcc-CVS20021019/gcc/config/i960/i960.c 2002-10-18 23:11:36.000000000 -0400
+++ egcc-CVS20021019/gcc/config/i960/i960.c 2002-10-19 22:29:36.720176799 -0400
@@ -2829,7 +2829,7 @@ void
i960_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
int d = delta;
diff -rup orig/egcc-CVS20021019/gcc/config/ia64/ia64-protos.h egcc-CVS20021019/gcc/config/ia64/ia64-protos.h
--- orig/egcc-CVS20021019/gcc/config/ia64/ia64-protos.h 2002-10-18 23:11:36.000000000 -0400
+++ egcc-CVS20021019/gcc/config/ia64/ia64-protos.h 2002-10-19 22:31:02.102433093 -0400
@@ -121,7 +121,7 @@ extern int ia64_function_arg_pass_by_ref
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));
+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,
diff -rup orig/egcc-CVS20021019/gcc/config/ia64/ia64.c egcc-CVS20021019/gcc/config/ia64/ia64.c
--- orig/egcc-CVS20021019/gcc/config/ia64/ia64.c 2002-10-18 23:11:37.000000000 -0400
+++ egcc-CVS20021019/gcc/config/ia64/ia64.c 2002-10-19 22:30:44.673977920 -0400
@@ -8163,7 +8163,7 @@ void
ia64_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
if (CONST_OK_FOR_I (delta))
diff -rup orig/egcc-CVS20021019/gcc/config/m68k/m68k-protos.h egcc-CVS20021019/gcc/config/m68k/m68k-protos.h
--- orig/egcc-CVS20021019/gcc/config/m68k/m68k-protos.h 2002-10-18 23:11:38.000000000 -0400
+++ egcc-CVS20021019/gcc/config/m68k/m68k-protos.h 2002-10-19 22:32:40.113508682 -0400
@@ -65,7 +65,7 @@ extern rtx legitimize_pic_address PARAMS
#endif /* RTX_CODE */
#ifdef TREE_CODE
-extern void m68k_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
+extern void m68k_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif /* TREE_CODE */
extern int flags_in_68881 PARAMS ((void));
diff -rup orig/egcc-CVS20021019/gcc/config/m68k/m68k.c egcc-CVS20021019/gcc/config/m68k/m68k.c
--- orig/egcc-CVS20021019/gcc/config/m68k/m68k.c 2002-10-18 23:11:38.000000000 -0400
+++ egcc-CVS20021019/gcc/config/m68k/m68k.c 2002-10-19 23:02:53.012828952 -0400
@@ -3840,15 +3840,19 @@ void
m68k_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT d;
tree function;
{
if (delta > 0 && delta <= 8)
- asm_fprintf (file, "\taddq.l %I%d,4(%Rsp)\n", delta);
+ 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", -delta);
+ asm_fprintf (file, "\tsubq.l %I%d,4(%Rsp)\n", (int) -delta);
else
- asm_fprintf (file, "\tadd.l %I%d,4(%Rsp)\n", delta);
+ {
+ fprintf (file, "\tadd.l %I");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, delta);
+ asm_fprintf (file, ",4(%Rsp)\n", delta);
+ }
if (flag_pic)
{
diff -rup orig/egcc-CVS20021019/gcc/config/mmix/mmix-protos.h egcc-CVS20021019/gcc/config/mmix/mmix-protos.h
--- orig/egcc-CVS20021019/gcc/config/mmix/mmix-protos.h 2002-08-20 22:37:36.000000000 -0400
+++ egcc-CVS20021019/gcc/config/mmix/mmix-protos.h 2002-10-19 22:34:04.755785884 -0400
@@ -80,7 +80,7 @@ extern void mmix_asm_output_aligned_loca
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));
+extern void mmix_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
/* Need tree.h and rtl.h */
# ifdef RTX_CODE
diff -rup orig/egcc-CVS20021019/gcc/config/mmix/mmix.c egcc-CVS20021019/gcc/config/mmix/mmix.c
--- orig/egcc-CVS20021019/gcc/config/mmix/mmix.c 2002-09-28 16:00:16.000000000 -0400
+++ egcc-CVS20021019/gcc/config/mmix/mmix.c 2002-10-19 22:33:57.066515321 -0400
@@ -776,7 +776,7 @@ void
mmix_asm_output_mi_thunk (stream, fndecl, delta, func)
FILE * stream;
tree fndecl ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree func;
{
/* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM,
@@ -785,9 +785,9 @@ mmix_asm_output_mi_thunk (stream, fndecl
const char *regname = reg_names[MMIX_FIRST_INCOMING_ARG_REGNUM];
if (delta >= 0 && delta < 65536)
- fprintf (stream, "\tINCL %s,%d\n", regname, delta);
+ fprintf (stream, "\tINCL %s,%d\n", regname, (int)delta);
else if (delta < 0 && delta >= -255)
- fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, -delta);
+ fprintf (stream, "\tSUBU %s,%s,%d\n", regname, regname, (int)-delta);
else
{
mmix_output_register_setting (stream, 255, delta, 1);
diff -rup orig/egcc-CVS20021019/gcc/config/rs6000/rs6000-protos.h egcc-CVS20021019/gcc/config/rs6000/rs6000-protos.h
--- orig/egcc-CVS20021019/gcc/config/rs6000/rs6000-protos.h 2002-09-16 13:18:22.000000000 -0400
+++ egcc-CVS20021019/gcc/config/rs6000/rs6000-protos.h 2002-10-19 22:47:46.243286497 -0400
@@ -150,7 +150,7 @@ extern void setup_incoming_varargs PARAM
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 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' */
diff -rup orig/egcc-CVS20021019/gcc/config/rs6000/rs6000.c egcc-CVS20021019/gcc/config/rs6000/rs6000.c
--- orig/egcc-CVS20021019/gcc/config/rs6000/rs6000.c 2002-10-16 21:34:17.000000000 -0400
+++ egcc-CVS20021019/gcc/config/rs6000/rs6000.c 2002-10-19 23:14:43.680437481 -0400
@@ -11236,7 +11236,7 @@ void
output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
const char *this_reg =
@@ -11254,9 +11254,9 @@ output_mi_thunk (file, thunk_fndecl, del
if (delta >= -32768 && delta <= 32767)
{
if (! TARGET_NEW_MNEMONICS)
- fprintf (file, "\tcal %s,%d(%s)\n", this_reg, delta, this_reg);
+ 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, delta);
+ 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. */
diff -rup orig/egcc-CVS20021019/gcc/config/s390/s390-protos.h egcc-CVS20021019/gcc/config/s390/s390-protos.h
--- orig/egcc-CVS20021019/gcc/config/s390/s390-protos.h 2002-10-18 23:11:40.000000000 -0400
+++ egcc-CVS20021019/gcc/config/s390/s390-protos.h 2002-10-19 22:41:29.024411159 -0400
@@ -86,7 +86,7 @@ extern tree s390_build_va_list PARAMS ((
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));
+extern void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif /* RTX_CODE */
#endif /* TREE_CODE */
diff -rup orig/egcc-CVS20021019/gcc/config/s390/s390.c egcc-CVS20021019/gcc/config/s390/s390.c
--- orig/egcc-CVS20021019/gcc/config/s390/s390.c 2002-10-18 23:11:40.000000000 -0400
+++ egcc-CVS20021019/gcc/config/s390/s390.c 2002-10-19 22:41:15.465572380 -0400
@@ -5587,7 +5587,7 @@ void
s390_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
if (TARGET_64BIT)
diff -rup orig/egcc-CVS20021019/gcc/config/stormy16/stormy16-protos.h egcc-CVS20021019/gcc/config/stormy16/stormy16-protos.h
--- orig/egcc-CVS20021019/gcc/config/stormy16/stormy16-protos.h 2002-07-16 22:54:14.000000000 -0400
+++ egcc-CVS20021019/gcc/config/stormy16/stormy16-protos.h 2002-10-19 22:43:16.466748576 -0400
@@ -45,7 +45,7 @@ extern void xstormy16_expand_builtin_
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));
+extern void xstormy16_asm_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif
#ifdef RTX_CODE
diff -rup orig/egcc-CVS20021019/gcc/config/stormy16/stormy16.c egcc-CVS20021019/gcc/config/stormy16/stormy16.c
--- orig/egcc-CVS20021019/gcc/config/stormy16/stormy16.c 2002-09-18 13:38:56.000000000 -0400
+++ egcc-CVS20021019/gcc/config/stormy16/stormy16.c 2002-10-19 23:18:06.471858510 -0400
@@ -1384,7 +1384,7 @@ void
xstormy16_asm_output_mi_thunk (file, thunk_fndecl, delta, function)
FILE *file;
tree thunk_fndecl ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
int regnum = FIRST_ARGUMENT_REGISTER;
@@ -1393,7 +1393,7 @@ xstormy16_asm_output_mi_thunk (file, thu
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function))))
regnum += 1;
- fprintf (file, "\tadd %s,#0x%x\n", reg_names[regnum], (delta) & 0xFFFF);
+ 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);
diff -rup orig/egcc-CVS20021019/gcc/config/vax/vax-protos.h egcc-CVS20021019/gcc/config/vax/vax-protos.h
--- orig/egcc-CVS20021019/gcc/config/vax/vax-protos.h 2002-10-18 23:11:41.000000000 -0400
+++ egcc-CVS20021019/gcc/config/vax/vax-protos.h 2002-10-19 22:44:43.900274977 -0400
@@ -36,7 +36,7 @@ extern int check_float_value PARAMS ((en
#ifdef TREE_CODE
extern void vms_check_external PARAMS ((tree, const char *, int));
-extern void vax_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
+extern void vax_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
#endif /* TREE_CODE */
extern void vms_flush_pending_externals PARAMS ((FILE *));
diff -rup orig/egcc-CVS20021019/gcc/config/vax/vax.c egcc-CVS20021019/gcc/config/vax/vax.c
--- orig/egcc-CVS20021019/gcc/config/vax/vax.c 2002-10-18 23:11:41.000000000 -0400
+++ egcc-CVS20021019/gcc/config/vax/vax.c 2002-10-19 22:45:54.723620809 -0400
@@ -997,11 +997,13 @@ void
vax_output_mi_thunk (file, thunk, delta, function)
FILE *file;
tree thunk ATTRIBUTE_UNUSED;
- int delta;
+ HOST_WIDE_INT delta;
tree function;
{
fprintf (file, "\t.word 0x0ffc\n");
- asm_fprintf (file, "\taddl2 $%d,4(%Rap)\n", delta);
+ 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");
diff -rup orig/egcc-CVS20021019/gcc/target.h egcc-CVS20021019/gcc/target.h
--- orig/egcc-CVS20021019/gcc/target.h 2002-10-18 23:11:22.000000000 -0400
+++ egcc-CVS20021019/gcc/target.h 2002-10-19 22:51:15.164724522 -0400
@@ -121,11 +121,11 @@ struct gcc_target
void (* destructor) PARAMS ((rtx, int));
/* Output the assembler code for a thunk function. */
- void (* output_mi_thunk) PARAMS ((FILE *, tree, int, tree));
+ 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, int, int, tree));
+ void (* output_mi_vcall_thunk) PARAMS ((FILE *, tree, HOST_WIDE_INT, int, tree));
} asm_out;
/* Functions relating to instruction scheduling. */