[ira] patch fixing sigfault on sh
Vladimir Makarov
vmakarov@redhat.com
Sun Apr 6 03:37:00 GMT 2008
The patch solves the problem reported by Kaz Kojima in right way
(sigfault in init_fake_stack_mems).
For sh, MEMORY_MOVE_COST call in init_ira uses
memory_move_secondary_cost which needs top_of_stack initialized in
init_fake_stack_mems. So init_ira was called in a wrong palce.
The patch does not change generated code for x86/x86_64, ppc64,
and itanium.
2008-04-05 Vladimir Makarov <vmakarov@redhat.com>
* toplev.c (backend_init_target): Move init_ira after
init_fake_stack_mems.
* config/sh/sh.c (sh_secondary_reload): Remove check of x on null.
Index: toplev.c
===================================================================
--- toplev.c (revision 133840)
+++ toplev.c (working copy)
@@ -1966,12 +1966,12 @@ backend_init_target (void)
mode-dependent. */
init_regs ();
- /* This invokes IRA to set up reg related data structures. */
- init_ira ();
-
/* This depends on stack_pointer_rtx. */
init_fake_stack_mems ();
+ /* This invokes IRA to set up reg related data structures. */
+ init_ira ();
+
/* Sets static_base_value[HARD_FRAME_POINTER_REGNUM], which is
mode-dependent. */
init_alias_target ();
More information about the Gcc-patches
mailing list