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

Jim Grosbach grosbach at apple.com
Wed Aug 8 16:22:49 PDT 2012


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
>  
> 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
> llvm-commits at cs.uiuc.edu
> 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/20120808/7adb6a0f/attachment.html>


More information about the llvm-commits mailing list