<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi Tim.</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Just revisiting this older patch. Truth be told, "pc" usage for these instructions</div>
<div style="font-family:arial,sans-serif;font-size:13px">is pre-UAL syntax. We had discussed on a different thread that we should not</div><div style="font-family:arial,sans-serif;font-size:13px">add pre-UAL support unless there is a general decision to support it.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I propose to not accept PC at all as an operand. There already is a register</div><div style="font-family:arial,sans-serif;font-size:13px">
class containing APSR and I updated the patch to remove PC from the list.</div><div style="font-family:arial,sans-serif;font-size:13px">This takes effect over both ARM and Thumb.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br>Regards,</div><div style="font-family:arial,sans-serif;font-size:13px">Mihai</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 25, 2013 at 10:56 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mihail,<br>
<div class="im"><br>
> Please review the attached patch.<br>
> This adds APSR_nzcv as a valid operand for Thumb2 mrc instructions.<br>
<br>
</div>I realise this is just extending ARM behaviour to Thumb2 but I think<br>
the MCInst representation is dodgy, as evidenced by the "pc" variants<br>
printing again with a "pc" instead of "apsr_nzcv". These are the same<br>
instructions so there should only be one valid MCInst representing<br>
them.<br>
<br>
If we really, really want to support pre-UAL syntax output at some<br>
point in the future that should be handled by some policy decision<br>
acting on the canonical MCInst for a particular instruction instead.<br>
<br>
I think you should be able to handle things reasonably neatly (i.e.<br>
without instruction-specific MRC/... hacks) by adding a<br>
"RegisterOperand" class for GPRwithAPSR that links into the AsmParser<br>
and switches a parsed "pc" to an "apsr".<br>
<br>
Cheers.<br>
<br>
Tim.<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>