* Makefile.in (LIBGCC2_CFLAGS): Add -fexceptions.
- * alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC,
+ * alias.c (find_base_term): Handle PRE_INC, PRE_DEC, POST_INC,
and POS_DEC.
- (find_base_term): Likewise.
* alias.c (true_dependence): Fix typo.
case LABEL_REF:
return src;
- case PRE_INC:
- case PRE_DEC:
- case POST_INC:
- case POST_DEC:
- src = XEXP (src, 0);
- /* fall through */
-
case REG:
/* At the start of a function argument registers have known base
values which may be lost later. Returning an ADDRESS
even when the argument registers are used for other purposes. */
if (REGNO (src) < FIRST_PSEUDO_REGISTER && copying_arguments)
return reg_base_value[REGNO (src)];
+ if (REG_N_SETS (REGNO (src)) == 1 && reg_base_value[REGNO (src)])
+ return reg_base_value[REGNO (src)];
return src;
case MEM:
case PLUS:
case MINUS:
{
- rtx src_0 = XEXP (src, 0), src_1 = XEXP (src, 1);
+ rtx temp, src_0 = XEXP (src, 0), src_1 = XEXP (src, 1);
+
+ if (GET_CODE (src_0) == REG)
+ {
+ temp = find_base_value (src_0);
+ if (temp)
+ src_0 = temp;
+ }
+
+ if (GET_CODE (src_1) == REG)
+ {
+ temp = find_base_value (src_1);
+ if (temp)
+ src_1 = temp;
+ }
/* Guess which operand is the base address.
|| GET_CODE (src_0) == CONST)
return find_base_value (src_0);
+ if (GET_CODE (src_0) == CONST_INT
+ || GET_CODE (src_1) == SYMBOL_REF
+ || GET_CODE (src_1) == LABEL_REF
+ || GET_CODE (src_1) == CONST)
+ return find_base_value (src_1);
+
if (GET_CODE (src_0) == REG && REGNO_POINTER_FLAG (REGNO (src_0)))
return find_base_value (src_0);