For C6X, I added a patch to separate out a REG_WORDS_BIG_ENDIAN macro from WORDS_BIG_ENDIAN. Since the patch was originally for 4.5, it missed a few new instances in IRA where we need to change which macro we use. The following patch makes big-endian kernels boot.
Bootstrapped and regression tested on i686-linux; can't affect any target other than C6X. Normally I'd check it in as obvious, but given that we're in stage4 I'll ask for an OK. Bernd
* ira.c (check_allocation): Use REG_WORDS_BIG_ENDIAN, not WORDS_BIG_ENDIAN. * ira-color.c (setup_profitable_hard_regs, check_hard_reg_p, assign_hard_reg): Likewise. Index: gcc/ira.c =================================================================== --- gcc/ira.c (revision 183969) +++ gcc/ira.c (working copy) @@ -2089,7 +2089,7 @@ check_allocation (void) int this_regno = hard_regno; if (n > 1) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) this_regno += n - i - 1; else this_regno += i; @@ -2108,7 +2108,7 @@ check_allocation (void) if (ALLOCNO_NUM_OBJECTS (conflict_a) > 1 && conflict_nregs == ALLOCNO_NUM_OBJECTS (conflict_a)) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) conflict_hard_regno += (ALLOCNO_NUM_OBJECTS (conflict_a) - OBJECT_SUBWORD (conflict_obj) - 1); else Index: gcc/ira-color.c =================================================================== --- gcc/ira-color.c (revision 183969) +++ gcc/ira-color.c (working copy) @@ -1067,7 +1067,7 @@ setup_profitable_hard_regs (void) { int num = OBJECT_SUBWORD (conflict_obj); - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) CLEAR_HARD_REG_BIT (ALLOCNO_COLOR_DATA (conflict_a)->profitable_hard_regs, hard_regno + nobj - num - 1); @@ -1451,7 +1451,7 @@ check_hard_reg_p (ira_allocno_t a, int h if (nregs == nwords) { - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) set_to_test_start = nwords - j - 1; else set_to_test_start = j; @@ -1610,7 +1610,7 @@ assign_hard_reg (ira_allocno_t a, bool r { int num = OBJECT_SUBWORD (conflict_obj); - if (WORDS_BIG_ENDIAN) + if (REG_WORDS_BIG_ENDIAN) SET_HARD_REG_BIT (conflicting_regs[word], hard_regno + n_objects - num - 1); else