<div dir="ltr">Folks,<div><br></div><div>Sorry for resurrecting an old thread, but this patch is really getting in the way of building Linux with LLVM.</div><div><br></div><div>Can anyone that knows more about the inline asm issue review it? It looks good to me, but I might be missing something.</div>
<div><br></div><div>Attaching the last known patch again, just in case someone missed it.</div><div><br></div><div>cheers,</div><div>--renato</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 March 2013 17:35, Weiming Zhao <span dir="ltr"><<a href="mailto:weimingz@codeaurora.org" target="_blank">weimingz@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
<br>
<br>
-----Original Message-----<br>
From: Måns Rullgård [mailto:<a href="mailto:mans@mansr.com">mans@mansr.com</a>]<br>
</div><div class="im">Sent: Wednesday, March 27, 2013 6:41 PM<br>
To: <a href="mailto:weimingz@codeaurora.org">weimingz@codeaurora.org</a><br>
Cc: 'Måns Rullgård'; 'Jim Grosbach'; 'Renato Golin'; 'Kristof Beyls'; 'Eric Christopher'; 'Jakob Stoklund Olesen'; 'LLVM Commits'<br>
Subject: Re: [LLVMdev] Problems with 64-bit register operands of inline asm on ARM<br>
<br>
</div><div><div class="h5">"Weiming Zhao" <<a href="mailto:weimingz@codeaurora.org">weimingz@codeaurora.org</a>> writes:<br>
<br>
> Hi Måns,<br>
><br>
> If you try my patch, it supports "ldrd %0, [%1]" although my test case<br>
> doesn't include that.<br>
><br>
> The current logic is, for inline asm, LLVM just emits one reg for %x<br>
> place holders.<br>
> For a GPRPair, when it sees %0, it emits the first sub reg.<br>
> When it sees %H0, it emits the second sub reg.<br>
<br>
That matches the gcc behaviour and is what people would expect.<br>
<br>
> On the other side, it's hard for LLVM to give a warning diagnose for<br>
> your test because LLVM doesn’t even parse the instruction string<br>
> inside the inline asm.<br>
<br>
It currently fails if using the integrated assembler.  When using gas it obviously works exactly as with gcc.<br>
<br>
</div></div>[Weiming] Exactly. But if we decide to fix it, it should be fixed by integrated assembler. From inline asm part, we can't simply expand %0 to (Rt, Rt+1) because it will break other cases (ldrexd/strexd) as I mentioned before. It is also hard to specialize for ldrd/strd cse because we don't parse the inline asm string.<br>

<br>
Thanks,<br>
Weiming<br>
--<br>
Måns Rullgård<br>
<a href="mailto:mans@mansr.com">mans@mansr.com</a><br>
<br>
</blockquote></div><br></div>