<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 17, 2014 at 8:59 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On 2014 Feb 17, at 20:30, lin zuojian <<a href="mailto:manjian2006@gmail.com">manjian2006@gmail.com</a>> wrote:<br>
<br>
> patch v2:<br>
><br>
> Index: test/MC/ARM/dot-req-capital.s<br>
> ===================================================================<br>
> --- test/MC/ARM/dot-req-capital.s (revision 0)<br>
> +++ test/MC/ARM/dot-req-capital.s (working copy)<br>
> @@ -0,0 +1,14 @@<br>
> +@ RUN: llvm-mc -triple=arm-linux-androideabi < %s | FileCheck %s<br>
> + .syntax unified<br>
> +_foo:<br>
> +<br>
> + OBJECT .req r2<br>
> + mov r4, OBJECT<br>
> + mov r4, oBjEcT<br>
> + .unreq OBJECT<br>
> +<br>
> +_foo2:<br>
> + OBJECT .req r5<br>
> + mov r4, OBJECT<br>
> + .unreq OBJECT<br>
<br>
</div>Awesome, almost there.<br>
<br>
1. Add a couple of CHECK lines to confirm the output is correct.  Probably along<br>
   the lines of:<br>
<br>
        @ CHECK-LABEL: _foo:<br>
        @ CHECK: mov r4, r2<br>
        @ CHECK: mov r4, r2<br>
<br>
    and<br>
<br>
        @ CHECK-LABEL: _foo2:<br>
        @ CHECK: mov r4, r5<br>
<br>
    unless I’ve misunderstood what .req does.<br>
<br>
2. Add a comment to the testcase (usually after the RUN line) to document why<br>
   this testcase is important.  Often people will reference the bug here.<br>
   E.g.,<br>
<br>
        @ PR18833: Confirm that .req and .unreq are case-insensitive.<br>
<div class=""><br>
> Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp<br>
> ===================================================================<br>
> --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp (revision 201500)<br>
> +++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp (working copy)<br>
> @@ -8243,7 +8243,7 @@<br>
> Error(L, "unexpected input in .unreq directive.");<br>
> return false;<br>
> }<br>
> - RegisterReqs.erase(Parser.getTok().getIdentifier());<br>
> + RegisterReqs.erase(Parser.getTok().getIdentifier().lower());<br>
> Parser.Lex(); // Eat the identifier.<br>
> return false;<br>
> }<br>
<br>
</div>The code looks correct to me, but I haven’t worked with the AsmParsers before.<br>
<br>
Anyone else see a problem with it?<br></blockquote><div><br></div><div>Whilst this is conceptually correct, I dont think it is sufficient.  This will fix the `.unreq' directive but will not handle the use of the alias.  Both of them should be addressed simultaneously imo.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">_______________________________________________<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></div></div></blockquote><div> </div></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>