<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 18, 2014 at 5:43 PM, lin zuojian <span dir="ltr"><<a href="mailto:manjian2006@gmail.com" target="_blank">manjian2006@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Okay,I think this patch is able to test the unreq behaviour for case<br>
insensitivity<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,28 @@<br>
+@ RUN: llvm-mc -triple=arm < %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>
+_foo3:<br>
+ OBJECT .req r6<br>
+ mov r4, OBJECT<br>
+ .unreq OBJECT<br>
+<br>
+@ CHECK-LABEL: _foo:<br>
+@ CHECK: mov r4, r2<br>
+@ CHECK: mov r4, r2<br>
+<br>
+@ CHECK-LABEL: _foo2:<br>
+@ CHECK: mov r4, r5<br>
+<br>
+@ CHECK-LABEL: _foo3:<br>
+@ CHECK: mov r4, r6<br></blockquote><div><br></div><div>Minor point: I think that moving the unreq from _foo2 to _foo would result in a much more compact test case.  Its unclear what the the three cases add as compared to the single case.  It might also be nice to call the test req_case_insensitivity (as it describes what you are really testing).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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></blockquote><div><br></div><div>LGTM.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--<br>
lin zuojian</blockquote></div><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>