Commit c1875d66 by Richard Stallman

(find_reloads_address): Be selective about what inner

addresses to allow in an indirect mem ref.

From-SVN: r4783
parent 8b3d0251
......@@ -3888,10 +3888,16 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels)
}
/* We can avoid a reload if the register's equivalent memory expression
is valid as an indirect memory address. */
is valid as an indirect memory address.
But not all addresses are valid in a mem used as an indirect address:
only reg or reg+constant. */
else if (reg_equiv_mem[regno] != 0 && ind_levels > 0
&& strict_memory_address_p (mode, reg_equiv_mem[regno]))
&& strict_memory_address_p (mode, reg_equiv_mem[regno])
&& (GET_CODE (XEXP (reg_equiv_mem[regno], 0)) == REG
|| (GET_CODE (XEXP (reg_equiv_mem[regno], 0)) == PLUS
&& GET_CODE (XEXP (XEXP (reg_equiv_mem[regno], 0), 0)) == REG
&& CONSTANT_P (XEXP (XEXP (reg_equiv_mem[regno], 0), 0)))))
return 0;
/* The only remaining case where we can avoid a reload is if this is a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment