[llvm-commits] Fixing Bug 13662: paired register for inline asm with 64-bit data on ARM
Weiming Zhao
weimingz at codeaurora.org
Mon Oct 15 10:58:37 PDT 2012
Hi Jakob,
Thanks for your guide.
I'm attaching a new patch that is completely re-implemented by using GPRPair
as you suggested.
Please help to review it.
Thanks
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
-----Original Message-----
From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk]
Sent: Wednesday, October 03, 2012 2:46 PM
To: weimingz at codeaurora.org
Cc: 'Jim Grosbach'; llvm-commits at cs.uiuc.edu; zinob at codeaurora.org
Subject: Re: [llvm-commits] Fixing Bug 13662: paired register for inline asm
with 64-bit data on ARM
On Oct 3, 2012, at 11:30 AM, Weiming Zhao <weimingz at codeaurora.org> wrote:
> I implemented a GPRPair with "untyped".
> However, during building DAG, (SelectionDAGBuilder::visitInlineASM),
> when it tries to do getCopyFromRegs, it fails.
> This is because RegisterVT is unknow, so it cannot match with value type.
> And after the unknow type or i64 propagates, more places need to be
> repaired/specially treated.
Hi Weiming,
When passing an i64 value to inline asm with this constraint, the DAG should
go like this:
%pair<untyped> = REG_SEQUENCE GPRPair, %val0<i32>, gsub0, %val1<i32>,
gsub1
INLINEASM %pair<untyped>
Here, %val0 and %val1 are the legalized parts of the original i64 value.
Similarly, when returning a value like that from inline asm:
%pair<untyped> = INLINEASM
%val0<i32> = EXTRACT_SUBREG %pair<untyped>, gsub0
%val1<i32> = EXTRACT_SUBREG %pair<untyped>, gsub1
It would be great if this could happen in target independent code, but it is
possible you have to do it in the target code.
/jakob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Bug-13622-Fix-consecutive-register-for-inline-asm-wi.patch
Type: application/octet-stream
Size: 21745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121015/1b02d5af/attachment.obj>
More information about the llvm-commits
mailing list