[llvm-commits] Patch for Bug 13556: ARM AsmPrinter doesn't support %H modifier in inline ASM

Weiming Zhao weimingz at codeaurora.org
Thu Aug 9 17:07:22 PDT 2012


Hi Jim,

 

Thanks for your reviewing.

I agree with your concern.

A new patch is attached, where I use ARMGPR register class to map the
register number. I assume that, in the td file, the order of registers in
GPR class is consistent with the encoding order.

 

Thanks,

Weiming

 

From: Jim Grosbach [mailto:grosbach at apple.com] 
Sent: Wednesday, August 08, 2012 4:23 PM
To: Weiming Zhao
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] Patch for Bug 13556: ARM AsmPrinter doesn't
support %H modifier in inline ASM

 

Hi Weiming,

 

The ordering of the register enum values does not map directly to the
encoding values.

 

Specifically, the following is fragile and even it it works OK now, it's
making unsafe assumptions about the underlying enum value that may break in
the future:

+      Reg = (Reg - ARM::R0) & 1 ? Reg : Reg + 1;

+      O << ARMInstPrinter::getRegisterName(Reg);

 

-Jim

 

On Aug 8, 2012, at 4:07 PM, Weiming Zhao <weimingz at codeaurora.org> wrote:





Hi,

 

I'm attaching a patch to fix bug 13556:
<http://llvm.org/bugs/show_bug.cgi?id=13556>
http://llvm.org/bugs/show_bug.cgi?id=13556

 

In ARM inline AMM, %H represents the highest-numbered register of a pair.

Routines like atomic read of 64-bit values needs this modifier.

Currently, ARMAsmPrinter doesn't support this modifier.

 

The patch fixes this issue.

Please feel free to review it.

 

Thanks,

Weiming

<0001-Support-H-modifier-for-ARM-inline-ASM.patch>__________________________
_____________________
llvm-commits mailing list
 <mailto:llvm-commits at cs.uiuc.edu> llvm-commits at cs.uiuc.edu
 <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120809/0297739c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-H-modifier-for-ARM-inline-ASM.patch
Type: application/octet-stream
Size: 2246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120809/0297739c/attachment.obj>


More information about the llvm-commits mailing list