<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 8:12 AM, 陳韋任 wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Perhaps my understanding of the .address_size directive is incomplete, but as far as I know it is just used as a flag for ptxas to make sure all PTX modules in a program assume the same pointer size.  That said, what is the purpose of allowing LLVM to generate 32-bit PTX code but assume 64-bit addresses, and vice versa?  Why not tie the directive directly to the existing 32/64-bit flag instead of allowing user intervention?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> I'll wait for Che-Liang and Dan's comment.<br></blockquote></blockquote><blockquote type="cite">Yep, Justin's right, it makes more sense to use the 64bit flag to indicate the address size. <br></blockquote><br>  What you want is removing FeatureAddrSize32/64 from PTX.td to avoid<br>user intervention, right? PTXAddrSize is assigned accroding to the<br>32/64-bit flag,<br><br>// PTXSubtarget ctor in PTXSubtarget.cpp<br>PTXAddrSize = is64Bit? PTX_AddrSize_64 : PTX_AddrSize_32;<br></div></blockquote><div><br></div><div>Correct.</div><br><blockquote type="cite"><div><br>  My question is where is64Bit will be set? Thanks!<br></div></blockquote><div><br></div><div>The is64Bit flag will be set depending on which PTX target is specified.</div><div><br></div><div>-march=ptx32 -> is64Bit = false</div><div>-march=ptx64 -> is64Bit = true</div><div><br></div><div>The only place this flag is currently used right now is to select between .u32 and .u64 for pointer types.</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></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Thanks,<br><br>Justin Holewinski</span>
</div>
<br></body></html>