[PATCH] Correct syntax of ARM mrc, mrc2 when writing to APSR

Mihail Popa mihail.popa at gmail.com
Mon May 13 06:53:08 PDT 2013


Tim,

thanks for the review. See attached updated patch. It adds APSR_NZCV to
reserved and introduces two new disassembler tests.

Regards,
Mihai


On Mon, May 13, 2013 at 2:00 PM, Tim Northover <t.p.northover at gmail.com>wrote:

> Hi Mihail,
>
> > The purpose of the patch is to fix the syntax of ARM mrc and mrc2
> > instructions when they are used to write to the APSR. In this case, the
> > destination operand should be APSR_nzcv, and the encoding of the target
> > should be 0b1111 (same as for PC).
>
> Thanks for looking at this.
>
> The changes look reasonable to me, though I'd probably suggest setting
> APSR_NZCV to reserved in ARMBaseRegisterInfo.cpp. Your AltOrders
> *should* prevent the register allocator doing anything stupid anyway,
> but just in case...
>
> Also, some of disassembly tests would be good. I don't think the
> DecodeGPRWithAPSR function is exercised by the assembly tests you
> added and none of the existing tests seem to use the 0b1111 encoding.
>
> 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/20130513/5911648f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-732.mrc.patch
Type: application/octet-stream
Size: 7916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130513/5911648f/attachment.obj>


More information about the llvm-commits mailing list