[llvm-commits] Patch for Bug 13556: ARM AsmPrinter doesn't support %H modifier in inline ASM
Eric Christopher
echristo at apple.com
Mon Aug 13 11:20:04 PDT 2012
Committed thusly;
M lib/Target/ARM/ARMAsmPrinter.cpp
M test/CodeGen/ARM/arm-modifier.ll
Committed r161768
Sorry for the delay.
-eric
On Aug 10, 2012, at 5:07 PM, Weiming Zhao <weimingz at codeaurora.org> wrote:
> Hi Eric,
>
> Thanks for your reviewing!
>
> I'm attaching a updated patch.
> Feel free to let me know if there is anything wrong.
>
> Thanks,
> Weiming
>
>
> -----Original Message-----
> From: Eric Christopher [mailto:echristo at apple.com]
> Sent: Friday, August 10, 2012 2:08 PM
> To: Weiming Zhao
> Cc: 'Jim Grosbach'; llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] Patch for Bug 13556: ARM AsmPrinter doesn't
> support %H modifier in inline ASM
>
> Actually take a look at the patch I put in yesterday that removes that code
> :)
>
> You can then do something, I think, that looks like this:
>
> (RC is your regclass, RI is the register info)
>
> unsigned Reg = RC->getRegister(RI->getEncodingValue(MO.getReg()));
> unsigned RegToPrint = // check for even/odd here O <<
> ARMInstPrinter::getRegisterName(RegToPrint);
>
> Also from first glance it looks like the indenting was a little off starting
> where you were checking the regclass and there's no need for the \09s in the
> testcase.
>
> -eric
>
> On Aug 9, 2012, at 5:07 PM, Weiming Zhao <weimingz at codeaurora.org> wrote:
>
>> 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
>>
>> 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
>>
>> <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
>
> <0001-Support-H-modifier-for-ARM-inline-ASM.patch>
More information about the llvm-commits
mailing list