<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Hi,</div><div><br></div><div>Changing the 2 to a 0 works for me with the NVPTX target:</div><div><br></div><div>#define NAN __builtin_nanf((const __attribute__((address_space(0))) char *)("”))</div><div><br></div><div>However, clang turns the builtin into a call into the C math library, which is not what we want…</div><div><br></div><div>Jeroen</div><br><div><div>On 15 Jun 2014, at 23:38, Matt Arsenault <<a href="mailto:arsenm2@gmail.com">arsenm2@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jun 15, 2014, at 3:33 PM, Jeroen Ketema <<a href="mailto:j.ketema@imperial.ac.uk">j.ketema@imperial.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Matt,</div><div><br></div><div><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">This needs to be replaced with: </div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">:#define NAN __builtin_nanf((const __attribute__((address_space(2))) char *)("”))</div></blockquote><br></div><div>This won’t work with the NVPTX target. It uses 4 as its constant address space and not 2 like r600.</div><div><br></div><div>Jeroen</div><br></div></blockquote></div><br><div>It turns out this doesn’t really work either. This is what the OS X headers use, and the public version of clang this seems to be broken</div></div></blockquote></div><br></body></html>