fix mi_thunk as rtl routines

Richard Henderson rth@twiddle.net
Sun Jun 15 07:41:00 GMT 2003


Joern found this earlier for the SH; this fixes all the others.


r~


        * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Call
        insn_locators_initialize.
        * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
        * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
        * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
        * config/sh/sh.c (sh_output_mi_thunk): Do it later.

Index: alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.311
diff -c -p -d -r1.311 alpha.c
*** alpha/alpha.c	10 Jun 2003 20:55:02 -0000	1.311
--- alpha/alpha.c	15 Jun 2003 07:28:27 -0000
*************** alpha_output_mi_thunk_osf (file, thunk_f
*** 8156,8161 ****
--- 8156,8162 ----
       instruction scheduling worth while.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
    insn = get_insns ();
+   insn_locators_initialize ();
    shorten_branches (insn);
    final_start_function (insn, file, 1);
    final (insn, file, 1, 0);
Index: ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.227
diff -c -p -d -r1.227 ia64.c
*** ia64/ia64.c	7 Jun 2003 17:11:45 -0000	1.227
--- ia64/ia64.c	15 Jun 2003 07:28:36 -0000
*************** ia64_output_mi_thunk (file, thunk, delta
*** 8542,8547 ****
--- 8542,8548 ----
       instruction scheduling worth while.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
  
+   insn_locators_initialize ();
    emit_all_insn_group_barriers (NULL);
    insn = get_insns ();
    shorten_branches (insn);
Index: rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.490
diff -c -p -d -r1.490 rs6000.c
*** rs6000/rs6000.c	13 Jun 2003 02:01:52 -0000	1.490
--- rs6000/rs6000.c	15 Jun 2003 07:28:47 -0000
*************** rs6000_output_mi_thunk (file, thunk_fnde
*** 12306,12311 ****
--- 12306,12312 ----
       instruction scheduling worth while.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
    insn = get_insns ();
+   insn_locators_initialize ();
    shorten_branches (insn);
    final_start_function (insn, file, 1);
    final (insn, file, 1, 0);
Index: sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.216
diff -c -p -d -r1.216 sh.c
*** sh/sh.c	10 Jun 2003 20:53:31 -0000	1.216
--- sh/sh.c	15 Jun 2003 07:28:53 -0000
*************** sh_output_mi_thunk (file, thunk_fndecl, 
*** 8322,8328 ****
    int did_load = 0;
    rtx scratch0, scratch1, scratch2;
  
-   insn_locators_initialize ();
    reload_completed = 1;
    no_new_pseudos = 1;
    current_function_uses_only_leaf_regs = 1;
--- 8322,8327 ----
*************** sh_output_mi_thunk (file, thunk_fndecl, 
*** 8438,8446 ****
    use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), this);
    emit_barrier ();
  
!     /* Run just enough of rest_of_compilation to do scheduling and get
       the insns emitted.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
    insns = get_insns ();
  
    if (optimize > 0 && flag_schedule_insns_after_reload)
--- 8437,8447 ----
    use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), this);
    emit_barrier ();
  
!   /* Run just enough of rest_of_compilation to do scheduling and get
       the insns emitted.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
+ 
+   insn_locators_initialize ();
    insns = get_insns ();
  
    if (optimize > 0 && flag_schedule_insns_after_reload)
Index: sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.244
diff -c -p -d -r1.244 sparc.c
*** sparc/sparc.c	13 Jun 2003 03:56:10 -0000	1.244
--- sparc/sparc.c	15 Jun 2003 07:28:59 -0000
*************** sparc_output_mi_thunk (file, thunk_fndec
*** 8632,8637 ****
--- 8632,8638 ----
       instruction scheduling worth while.  Note that use_thunk calls
       assemble_start_function and assemble_end_function.  */
    insn = get_insns ();
+   insn_locators_initialize ();
    shorten_branches (insn);
    final_start_function (insn, file, 1);
    final (insn, file, 1, 0);



More information about the Gcc-patches mailing list