<div>Here's an updated patch with some more revisions, adding some missing stuff I found while developing new tests for the new stuff.  Still lacking is that I also see that the "lowering" operation is missing support for some of the x86 constraints I added, which I'll work on next, as well as submitting the new tests for this stuff.  But may I check in the current changes, so as not to diverge too much from the trunk?  I've successfully run the regression tests, test-suite, and the gcc tests with Clang on Linux 64-bit with the current changes.</div>

<div> </div>
<div>-John<br><br></div>
<div class="gmail_quote">On Thu, Oct 7, 2010 at 10:39 AM, John Thompson <span dir="ltr"><<a href="mailto:john.thompson.jtsoftware@gmail.com">john.thompson.jtsoftware@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Here's another incremental patch related to inline asm constraints, summarized as follows:</div>
<div> </div>
<div>1. Get more correct reading on the value types.  (See note below.)</div>
<div>2. Add remaining generic constraint letter support documented in gcc docs.</div>
<div>3. Add remaining X86 constraint letter support documented in gcc docs.</div>
<div>
<div>4. Convert the weight type to an enum for easier manipulation.</div>
<div>5. Change the multi-alternatives array from a vector to a SmallVector.  (I might look into changing other vector usages later.)</div> </div>
<div>Regarding 1, there still is some overlap of the value type processing done in both TargetLowering::ParseConstraints and SelectionDAGBuilder::visitInlineAsm.  I'll address that once I'm sure the ParseConstraints stuff is 100% correct.</div>

<div> </div>
<div>Regarding 2 and 3 above, this was mainly only for the multiple-alternative selection.  There might be additional stuff that some of the constraints imply regarding register allocation and instruction selection, but I'm not trying to tackle that at this point.  I tried to follow the weighting semantics for the non-multiple-alternative constraint selection use elsewhere in the SelectionDAG stuff, such as favoring generic registers over specific.</div>

<div> </div>
<div>I ran the gcc tests on a Linux-64 box, comparing with an unmodified version, with no change in test results:</div>
<div> </div>
<div>Current gcc tests with clang test run:</div>
<div> </div>
<div># of expected passes        29998<br># of unexpected failures    9887<br># of unexpected successes    29<br># of expected failures        28<br># of unresolved testcases    1450<br># of untested testcases        273<br>
# of unsupported tests        811</div>
<div>/home/john/llvm/Release+Asserts/bin/clang  version 2.9 (trunk 115906)</div>
<div> </div>
<div>Original:</div>
<div><br># of expected passes        29998<br># of unexpected failures    9887<br># of unexpected successes    29<br># of expected failures        28<br># of unresolved testcases    1450<br># of untested testcases        273<br>
# of unsupported tests        811</div>
<div>/home/john/llvm_org/Release+Asserts/bin/clang  version 2.9 (trunk 115906)</div>
<div> </div>
<div>Diff:</div>
<div> </div>
<div>1c1<br>< Test Run By john on Thu Oct  7 00:07:16 2010<br>---<br>> Test Run By john on Thu Oct  7 00:52:50 2010<br>42706c42706<br>< /home/john/llvm/Release+Asserts/bin/clang  version 2.9 (trunk 115906)<br>---<br>
> /home/john/llvm_org/Release+Asserts/bin/clang  version 2.9 (trunk 115906)</div>
<div> </div>
<div>May I check in this incremental step?</div>
<div> </div>
<div>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com" target="_blank">John.Thompson.JTSoftware@gmail.com</a><br><br></div></blockquote></div><br><br clear="all"><br>-- <br>John Thompson<br>
<a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>