<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 19, 2011, at 9:51 PM, 陳韋任 wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi, Justin<br><br><blockquote type="cite"><blockquote type="cite"> What you want is removing FeatureAddrSize32/64 from PTX.td to avoid<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">user intervention, right? PTXAddrSize is assigned accroding to the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">32/64-bit flag,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">// PTXSubtarget ctor in PTXSubtarget.cpp<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">PTXAddrSize = is64Bit? PTX_AddrSize_64 : PTX_AddrSize_32;<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Correct.<br></blockquote><br>  Fixed.<br></div></blockquote><div><br></div><div>I hate to nit-pick, but do we really need the address size field and associated enumeration?  It's always tied to the 64-bit flag, and we do not need to create any TableGen predicates from the value.</div><div><br></div><div>I think this patch can be as simple as:</div><div><br></div><div><div><font class="Apple-style-span" face="Monaco">if (ST.supportsPTX23()) {</font></div><div><font class="Apple-style-span" face="Monaco">  std::string addrSize = is64Bit() ? "64" : "32";</font></div><div><font class="Apple-style-span" face="Monaco">  OutStreamer.EmitRawText(Twine("\t.address_size " + addrSize));</font></div><div><font class="Apple-style-span" face="Monaco">}</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div>… with the appropriate test cases.</div><div><font class="Apple-style-span" face="Monaco"><br></font></div></div><br><blockquote type="cite"><div><br>Regards,<br>chenwj<br><br>-- <br>Wei-Ren Chen (陳韋任)<br>Computer Systems Lab, Institute of Information Science,<br>Academia Sinica, Taiwan (R.O.C.)<br>Tel:886-2-2788-3799 #1667<br><span><patch-llvm-133404.txt></span></div></blockquote></div><br><div>
Thanks,<br><br>Justin Holewinski
</div>
<br></body></html>