[llvm-commits] Fixing Bug 13662: paired register for inline asm with 64-bit data on ARM

Weiming Zhao weimingz at codeaurora.org
Thu Oct 18 12:11:21 PDT 2012


Hi Jakob,

Attached is the patch of adding GPRPair Reg class in ARM.
The GPR pair uses R0-SP (r13), all of the registers supported by
ldrexd/strexd instruction.
Then, the Paird Regs that contain reserved GPRs are set as reserved as well.
It also supports copyPhysReg, loadRegFromStackSlot, and
storeRegToStackSlot().

Unit testing at this stage is difficult because the intrinsic that use the
ldrexd/strexd will copy_reg from/to the GPRpair, so the live range of the
GPRPair is very short and hard to force the RA to spill them. And since the
patch won't affect the current functionality of LLVM, we can test it when
subsequent fixes come in.

Please help to review the patch.

Weiming

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 17, 2012 11:39 AM
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 17, 2012, at 11:26 AM, "Weiming Zhao" <weimingz at codeaurora.org>
wrote:

> HiJakob,
> 
> Thanks for your quick feedback.
> It's a good idea to split it into several pieces. 
> 
> Now, I'm planning to isolate the first patch for GPR Pair alone 
> (including td file, reserved regs, support for copying and spilling).
> However, one obstacle is unit testing. Without the inline asm fix as 
> the "driver", how do I test the functionality of GPR pair?
> Any suggestions? Or shall we delay the unit test until the picture is 
> more completed?

The inline asm support is fairly complicated, and definitely needs some
design iterations.

Perhaps you could switch LDREXD and STREXD to use the new register class?
That should be a lot easier design wise than the inlineasm support, and it
would give you good test cases.

/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-GPRPair-Register-class-to-ARM.patch
Type: application/octet-stream
Size: 7644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121018/ec95cc51/attachment.obj>


More information about the llvm-commits mailing list