<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 13, 2013 at 1:04 PM, Måns Rullgård <span dir="ltr"><<a href="mailto:mans@mansr.com" target="_blank">mans@mansr.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> writes:<br>

<br>
> On Mar 13, 2013, at 11:21 AM, Måns Rullgård <<a href="mailto:mans@mansr.com">mans@mansr.com</a>> wrote:<br>
><br>
>> Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> writes:<br>
>><br>
>>> On Mar 13, 2013, at 11:01 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>><br>
>>> wrote:<br>
>>><br>
>>>> On 13 March 2013 17:57, Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:<br>
>>>>> It seems to me that LLVM doesn’t parse the inline asm body. It just<br>
>>>>> checks the constraints, (ie. Input/output interface). During ASM<br>
>>>>> writing, it then binding those constraints to placeholders like %0,<br>
>>>>> %1.<br>
>>>> This is correct.<br>
>>>><br>
>>>> Ok, so maybe checking all possible ways to require paired registers<br>
>>>> is not such a bad idea after all.<br>
>>>><br>
>>><br>
>>> The constraints are the right way to do it. There shouldn't be any<br>
>>> magic beyond that.<br>
>><br>
>> Since there is no special operand constraint for a register pair, there<br>
>> is no way to tell at that level.<br>
>><br>
>> GCC has (implicitly) defined 64-bit register operands as residing in<br>
>> even/odd pairs, thus leaving inline asm free to make all manner of<br>
>> assumptions based on this.  The only way I see to guarantee<br>
>> compatibility is to mimic the gcc behaviour here.  It may be slightly<br>
>> suboptimal in a few cases, but it's the safe choice.<br>
><br>
> Sure, that's fine for ARM mode. No realistic other option there. So<br>
> long as Thumb2 code can get the more expressive syntax for the more<br>
> relaxed regalloc availability, it's all good. This basically falls<br>
> into "using the constraints to figure it out."<br>
<br>
</div></div>So let's at least make this pair allocation unconditional in ARM mode.<br>
A lot of existing inline asm doesn't work in Thumb mode anyway, so if<br>
that fails, it's less of an issue.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div style>I can agree with this. Bugged me last time I was looking at it too.</div><div style><br></div><div style>-eric </div></div></div>
</div>