[PATCH] Allow %w, %z operands to be immediates for AArch64

weimingz at codeaurora.org weimingz at codeaurora.org
Thu Oct 31 00:51:55 PDT 2013


Hi Tim,

Thanks for reviewing. Attached is the modified version.
I guess I roughtly understand what you mean :D
Please feel free to let me know if it needs other modification.

Thanks,
Weiming

> Hi Weiming,
>
>> This patch is to fix http://llvm.org/bugs/show_bug.cgi?id=17728
>>
>> Please help to review it.
>
> I think the patch is too much of a point-fix for this one case. Even
> the comment refers solely to this situation when there are far more
> combinations that could cause this.
>
> The X86 backend seems to deal with this in a more natural way, though
> I don't think its approach is directly applicable. Its logic is
> essentially:
> 1. Does this modifier apply to this operand?
> 2. If so, print it as such
> 3. Else, pretend there was no modifier.
>
> In the AArch64 context this is probably best implemented by moving the
> generic code to the bottom of the function (so it gets executed when
> the switch "break"s) and checking "if (MO.isReg()) ..." before calling
> printModifiedGPRAsmOperand. Similar tests could apply to the
> floating-point versions (e.g. asm("fcmp %0, %s1" :: "r"(lhs),
> "rY"(0.0f))) and probably the addresses too.
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-AArch64-Allow-wzbhsdq-operands-be-immediates.patch
Type: text/x-patch
Size: 5321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131031/96955fab/attachment.bin>


More information about the llvm-commits mailing list