This article helped me a bit when porting Shake to x86_64 (the first in the series is linked from the article):<p><a href="http://blogs.msdn.com/b/oldnewthing/archive/2004/01/14/58579.aspx" rel="nofollow">http://blogs.msdn.com/b/oldnewthing/archive/2004/01/14/58579...</a><p>The x86_64 calling convention can be a bit hairy. C.f. <a href="http://blog.nelhage.com/2010/10/amd64-and-va_arg/" rel="nofollow">http://blog.nelhage.com/2010/10/amd64-and-va_arg/</a><p>The best thing about really large C++ applications with assembly glue deep in their core is that <i>nothing</i> works until you rewrite the glue for the new platform.<p>You can't debug the thing like a normal app when its hand-rolled threading and mutex library from 1997 doesn't work. So you tread forward; only suckers use debuggers. You can tell what it's <i>supposed</i> to do by reading the assembly and function names from the other platforms... (ppc, alpha (SGI), and i386 in this case).<p>Naturally, none of the assembly parts had any documentation. Honestly, it's probably good that they didn't (j/k). My guess as to what they were thinking: "if they don't understand it then they shouldn't be writing the asm for the next platform". I guess they were right.<p>Finally, you get the glue right and it's an "ah-ha" moment. Everything suddenly starts working.