This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ira] patch to fix stack register problem
Kaz Kojima wrote:
Vladimir Makarov <vmakarov@redhat.com> wrote:
The patch was successfully bootstrapped on x86_64 and tortured on
x86/x86_64.
BTW, builds for SH and ARM on ira branch fail with
~/ira/gcc/ira-color.c:2794: undefined reference to `ALLOCNO_NO_STACK_REG_P'
I'm using the patch below to avoid it.
Thanks for pointing this, Kaz. I've committed the following patch.
2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
* ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
STACK_REGS is defined.
Index: ira-color.c
===================================================================
--- ira-color.c (revision 134956)
+++ ira-color.c (working copy)
@@ -2749,7 +2749,10 @@ ira_color (void)
void
ira_fast_allocation (void)
{
- int i, j, k, l, class_size, no_stack_reg_p, hard_regno;
+ int i, j, k, l, class_size, hard_regno;
+#ifdef STACK_REGS
+ int no_stack_reg_p;
+#endif
enum reg_class cover_class;
enum machine_mode mode;
allocno_t a;
@@ -2791,7 +2794,9 @@ ira_fast_allocation (void)
conflict_hard_regs))
continue;
mode = ALLOCNO_MODE (a);
+#ifdef STACK_REGS
no_stack_reg_p = ALLOCNO_NO_STACK_REG_P (a);
+#endif
class_size = class_hard_regs_num[cover_class];
for (j = 0; j < class_size; j++)
{