On 10/25/13 02:39, Eric Botcazou wrote:
Thanks.  Installed on the trunk.

Well, no, that will be problematic for some architectures.  The history of
this piece of code is complicated and it's admittedly lacking a comment, but
the purpose of the block is clear enough:

        op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM);
        op0 = memory_address_addr_space (address_mode, op0, as);
        if (!integer_zerop (TREE_OPERAND (exp, 1)))
          {
            rtx off
              = immed_double_int_const (mem_ref_offset (exp), address_mode);
            op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
          }
        op0 = memory_address_addr_space (mode, op0, as);

The offset computation is done in address_mode and then, only at the end,
converted to mode.
My reading of memory_address_addr_space is that MODE is the mode of the memory reference, not the mode of the address. I fail to see how passing in the mode of the address in the first call can be correct.

What am I missing?

jeff

Reply via email to