[PATCH] Support APSR_nzcv as operand for Thumb2 mrc

Mihail Popa mihail.popa at gmail.com
Tue Aug 6 08:41:24 PDT 2013


Hi Tim.

Just revisiting this older patch. Truth be told, "pc" usage for these
instructions
is pre-UAL syntax. We had discussed on a different thread that we should not
add pre-UAL support unless there is a general decision to support it.

I propose to not accept PC at all as an operand. There already is a register
class containing APSR and I updated the patch to remove PC from the list.
This takes effect over both ARM and Thumb.

Regards,
Mihai


On Tue, Jun 25, 2013 at 10:56 AM, Tim Northover <t.p.northover at gmail.com>wrote:

> Hi Mihail,
>
> > Please review the attached patch.
> > This adds APSR_nzcv as a valid operand for Thumb2 mrc instructions.
>
> I realise this is just extending ARM behaviour to Thumb2 but I think
> the MCInst representation is dodgy, as evidenced by the "pc" variants
> printing again with a "pc" instead of "apsr_nzcv". These are the same
> instructions so there should only be one valid MCInst representing
> them.
>
> If we really, really want to support pre-UAL syntax output at some
> point in the future that should be handled by some policy decision
> acting on the canonical MCInst for a particular instruction instead.
>
> I think you should be able to handle things reasonably neatly (i.e.
> without instruction-specific MRC/... hacks) by adding a
> "RegisterOperand" class for GPRwithAPSR that links into the AsmParser
> and switches a parsed "pc" to an "apsr".
>
> Cheers.
>
> Tim.
> _______________________________________________
> 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/20130806/65723c59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-762.t2mrc.patch
Type: application/octet-stream
Size: 5288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130806/65723c59/attachment.obj>


More information about the llvm-commits mailing list