<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Oh man r142320 fixed this.<div><br></div><div>Wow... talk about off-by-one.</div><div><br></div><div>Joe</div><div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; 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; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Joe Abbey<br>Software Architect<br>Arxan Technologies, Inc.<br>1305 Cumberland Ave, Ste 215<br>West Lafayette, IN 47906<br><a href="mailto:jabbey@arxan.com">jabbey@arxan.com</a><br>www.arxan.com</div></span></span>
</div>
<br><div><div>On Oct 18, 2011, at 8:01 PM, Eli Friedman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tue, Oct 18, 2011 at 4:25 PM, Joe Abbey <<a href="mailto:jabbey@arxan.com">jabbey@arxan.com</a>> wrote:<br><blockquote type="cite">I'm so close to having LLVM build on PowerPC.  If there's any PowerPC<br></blockquote><blockquote type="cite">experts, help?<br></blockquote><blockquote type="cite">Lines like this:<br></blockquote><blockquote type="cite">      outs() << "[" << format("%2d", i) << "]"<br></blockquote><blockquote type="cite">             << "(sec " << format("%2d", int16_t(symbol->SectionNumber)) <<<br></blockquote><blockquote type="cite">")"<br></blockquote><blockquote type="cite">             << "(fl 0x" << format("%02x", symbol->Type.BaseType) << ")"<br></blockquote><blockquote type="cite">             << "(ty " << format("%3x", symbol->Type.ComplexType) << ")"<br></blockquote><blockquote type="cite">             << "(scl " << format("%3x", symbol->StorageClass) << ") "<br></blockquote><blockquote type="cite">             << "(nx " << unsigned(symbol->NumberOfAuxSymbols) << ") "<br></blockquote><blockquote type="cite">             << "0x" << format("%08x", symbol->Value) << " "<br></blockquote><blockquote type="cite">             << name << "\n";<br></blockquote><blockquote type="cite">Are trying to call the format function with<br></blockquote><blockquote type="cite">struct coff_symbol {<br></blockquote><blockquote type="cite">  struct StringTableOffset {<br></blockquote><blockquote type="cite">    support::ulittle32_t Zeroes;<br></blockquote><blockquote type="cite">    support::ulittle32_t Offset;<br></blockquote><blockquote type="cite">  };<br></blockquote><blockquote type="cite">  union {<br></blockquote><blockquote type="cite">    char ShortName[8];<br></blockquote><blockquote type="cite">    StringTableOffset Offset;<br></blockquote><blockquote type="cite">  } Name;<br></blockquote><blockquote type="cite">  support::ulittle32_t Value;<br></blockquote><blockquote type="cite">  support::little16_t SectionNumber;<br></blockquote><blockquote type="cite">  struct {<br></blockquote><blockquote type="cite">    support::ulittle8_t BaseType;<br></blockquote><blockquote type="cite">    support::ulittle8_t ComplexType;<br></blockquote><blockquote type="cite">  } Type;<br></blockquote><blockquote type="cite">  support::ulittle8_t  StorageClass;<br></blockquote><blockquote type="cite">  support::ulittle8_t  NumberOfAuxSymbols;<br></blockquote><blockquote type="cite">};<br></blockquote><blockquote type="cite">and on PowerPC it generates errors like:<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/include/llvm/Support/Format.h: In member function<br></blockquote><blockquote type="cite">'int llvm::format_object1<T>::snprint(char*, unsigned int) const [with T =<br></blockquote><blockquote type="cite">llvm::support::detail::packed_endian_specific_integral<unsigned int, little,<br></blockquote><blockquote type="cite">unaligned>]':<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/tools/llvm-objdump/llvm-objdump.cpp:622:<br></blockquote><blockquote type="cite">instantiated from here<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/include/llvm/Support/Format.h:88: warning: cannot<br></blockquote><blockquote type="cite">pass objects of non-POD type 'const struct<br></blockquote><blockquote type="cite">llvm::support::detail::packed_endian_specific_integral<unsigned int, little,<br></blockquote><blockquote type="cite">unaligned>' through '...'; call will abort at runtime<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/include/llvm/Support/Format.h: In member function<br></blockquote><blockquote type="cite">'int llvm::format_object2<T1, T2>::snprint(char*, unsigned int) const [with<br></blockquote><blockquote type="cite">T1 = llvm::support::detail::packed_endian_specific_integral<unsigned char,<br></blockquote><blockquote type="cite">little, unaligned>, T2 =<br></blockquote><blockquote type="cite">llvm::support::detail::packed_endian_specific_integral<unsigned char,<br></blockquote><blockquote type="cite">little, unaligned>]':<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/tools/llvm-objdump/llvm-objdump.cpp:622:<br></blockquote><blockquote type="cite">instantiated from here<br></blockquote><blockquote type="cite">/Users/jabbey/src/llvm/include/llvm/Support/Format.h:106: warning: cannot<br></blockquote><blockquote type="cite">pass objects of non-POD type 'const struct<br></blockquote><blockquote type="cite">llvm::support::detail::packed_endian_specific_integral<unsigned char,<br></blockquote><blockquote type="cite">little, unaligned>' through '...'; call will abort at runtime<br></blockquote><blockquote type="cite">Can I just cast the value, or would the correct fix be in something like<br></blockquote><blockquote type="cite">include/llvm/Support/Endian.h?<br></blockquote><br>Try to "svn up" first. :)<br><br>-Eli<br><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></body></html>