diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9a4bee9606..e5e5055b9b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-10-27 Joern Rennecke + + * lra-assigns.c (find_hard_regno_for): Fix use of WORDS_BIG_ENDIAN. + 2012-10-27 Georg-Johann Lay PR target/55034 diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index bcf26afcf29..1f89338ebe1 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -571,15 +571,12 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno) && HARD_REGNO_MODE_OK (hard_regno, PSEUDO_REGNO_MODE (regno)) && ! TEST_HARD_REG_BIT (impossible_start_hard_regs, hard_regno) && (nregs_diff == 0 -#ifdef WORDS_BIG_ENDIAN - || (hard_regno - nregs_diff >= 0 - && TEST_HARD_REG_BIT (reg_class_contents[rclass], - hard_regno - nregs_diff)) -#else - || TEST_HARD_REG_BIT (reg_class_contents[rclass], - hard_regno + nregs_diff) -#endif - )) + || (WORDS_BIG_ENDIAN + ? (hard_regno - nregs_diff >= 0 + && TEST_HARD_REG_BIT (reg_class_contents[rclass], + hard_regno - nregs_diff)) + : TEST_HARD_REG_BIT (reg_class_contents[rclass], + hard_regno + nregs_diff)))) { if (hard_regno_costs_check[hard_regno] != curr_hard_regno_costs_check)