[LLVMdev] Problems with 64-bit register operands of inline asm on ARM

Renato Golin renato.golin at linaro.org
Fri Jun 21 15:42:11 PDT 2013


Folks,

Sorry for resurrecting an old thread, but this patch is really getting in
the way of building Linux with LLVM.

Can anyone that knows more about the inline asm issue review it? It looks
good to me, but I might be missing something.

Attaching the last known patch again, just in case someone missed it.

cheers,
--renato


On 28 March 2013 17:35, Weiming Zhao <weimingz at codeaurora.org> wrote:

>
>
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
>
> -----Original Message-----
> From: Måns Rullgård [mailto:mans at mansr.com]
> Sent: Wednesday, March 27, 2013 6:41 PM
> To: weimingz at codeaurora.org
> Cc: 'Måns Rullgård'; 'Jim Grosbach'; 'Renato Golin'; 'Kristof Beyls';
> 'Eric Christopher'; 'Jakob Stoklund Olesen'; 'LLVM Commits'
> Subject: Re: [LLVMdev] Problems with 64-bit register operands of inline
> asm on ARM
>
> "Weiming Zhao" <weimingz at codeaurora.org> writes:
>
> > Hi Måns,
> >
> > If you try my patch, it supports "ldrd %0, [%1]" although my test case
> > doesn't include that.
> >
> > The current logic is, for inline asm, LLVM just emits one reg for %x
> > place holders.
> > For a GPRPair, when it sees %0, it emits the first sub reg.
> > When it sees %H0, it emits the second sub reg.
>
> That matches the gcc behaviour and is what people would expect.
>
> > On the other side, it's hard for LLVM to give a warning diagnose for
> > your test because LLVM doesn’t even parse the instruction string
> > inside the inline asm.
>
> It currently fails if using the integrated assembler.  When using gas it
> obviously works exactly as with gcc.
>
> [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.
>
> Thanks,
> Weiming
> --
> Måns Rullgård
> mans at mansr.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130621/46a0ef08/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Enable-GPRPair-for-all-i64-operands-for-ARM-mode.patch
Type: application/octet-stream
Size: 6682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130621/46a0ef08/attachment.obj>


More information about the llvm-commits mailing list