[PATCH, i386]: Handle subregs of AND zero extended address correctly

Uros Bizjak ubizjak@gmail.com
Tue Mar 13 20:09:00 GMT 2012


On Tue, Mar 13, 2012 at 9:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Mar 13, 2012 at 9:21 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> Hello!
>>
>> We allow addresses, zero extended with (AND (Dimode OP)
>> (0x0ffffffff)). Since we now track address mode precisely, we should
>> convert this operand to a SImode subreg before passing it further down
>> of ix86_decompose_address function. This fixes a small hole, where
>> operands in wrong mode could squeeze through.
>>
>> 2012-03-13  Uros Bizjak  <ubizjak@gmail.com>
>>
>>        * config/i386/i386.c (ix86_decompose_address): Handle subregs of
>>        AND zero extended address correctly.
>>
>> Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.
>
> I think this caused:
>
> FAIL: gcc.target/i386/pr43766.c scan-assembler-not lea[lq]?[ \t]

Ah, we also need to consider:

Failed to match this instruction:
(prefetch (and:DI (subreg:DI (plus:SI (ashift:SI (reg/v:SI 63 [ i ])
                    (const_int 2 [0x2]))
                (subreg:SI (reg/v/f:DI 62 [ a ]) 0)) 0)
        (const_int 4294967295 [0xffffffff]))
    (const_int 0 [0])
    (const_int 3 [0x3]))

Will fix tomorrow.

Thanks,
Uros.



More information about the Gcc-patches mailing list