On 08/02/19 10:23, Jakub Jelinek wrote:
> On Fri, Feb 08, 2019 at 11:06:02AM +0100, Christophe Lyon wrote:
>> On Fri, 8 Feb 2019 at 10:51, Jakub Jelinek <ja...@redhat.com> wrote:
>>>
>>> On Fri, Feb 08, 2019 at 10:18:03AM +0100, Christophe Lyon wrote:
>>>> I'm afaid this patch causes several regressions. Maybe they have
>>>> already been fixed post-commit (I have several validations for later
>>>> commits still running)?
>>>
>>> The following patch fixes the single ICE I've tried to reproduce.
>>> While iwmmxt.md movdi pattern uses =m, r and =r, m constraints, both
>>> arm.md and vfp.md movdi patterns use =m, q and =q, m constraints and thus
>>> allow also ip register.  The following patch is an attempt to do the same
>>> thing, just in the same patterns through arch_enabled attribute.
>>>
>>> Completely untested.
>>>
>>> 2019-02-08  Jakub Jelinek  <ja...@redhat.com>
>>>
>>>          PR bootstrap/88714
>>>          * config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Add alternative 
>>> with
>>>          q constraint instead of r, enable it only if not 
>>> TARGET_REALLY_IWMMXT.
>>
>> I've started validations with this patch, I expect the results later today.
> 
> Thanks.  Note, I don't understand why iwmmxt.md doesn't use q constraint, if
> it is only some omission, or some hw requirement.  So, the patch just
> follows what iwmmxt.md does.  I guess because iwmmxt.md movsi also uses r
> constraint, ip really shouldn't appear on that target.  But if just changing
> all r constraints to q without any arch_enabled works, that would be even
> simpler.
> 
>       Jakub
> 

Apologies for the break to everyone, and thanks Jakub for the fix.

I believe my mistake was that I didn't match the behaviour of the 
function `operands_ok_ldrd_strd` (that the peepholes use) and the 
constraints: so the peepholes allow using ip while the insn patterns don't.


I'm pretty sure there's no difference between the iwmmxt target and 
others so believe your simpler fix of just using 'q' is a good idea.
(there's no difference in gas and no documentation I have found mentions 
a difference).


I had decided to use 'r' instead of 'q' based on the phrase "ARM 
strongly recommends that you do not use R12 for Rt." under the 
"doubleword register restrictions" heading in the link below
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802a/CIHGJHED.html

But don't think the statement is something that *must* be followed, 
since it's a recommendation in the same list as hard requirements. 
There's no mention of this in any ARM ARM that I can find.

Matthew

Reply via email to