title: ARM calling conventions on WinCE and Linux?
body: <p>Do WinCE and Linux use the same calling convention on ARM? What are the differences?</p>
  
  <p>The documents I've found so far do not explain very well. For example on <a href="http://msdn.microsoft.com/en-us/library/ms864497.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms864497.aspx</a>, it says "Windows CE .NET Compiler" on one line, but "the ARM compiler" on the next line, and "CLARM" at the bottom, and it's not clear whether it is referring to the same compiler or different compilers. Here's what I've found so far...</p>
  
  <ul>
  <li><a href="http://msdn.microsoft.com/en-us/library/ms881418.aspx" rel="nofollow noreferrer">ARM Calling Sequence Specification</a> (WinCE) - poorly-written documentation</li>
  <li><a href="https://stackoverflow.com/questions/261419/arm-to-c-calling-convention-registers-to-save">ARM to C calling convention</a> (Linux) - informal explanation</li>
  <li><a href="http://en.wikipedia.org/wiki/Calling_convention#ARM" rel="nofollow noreferrer">Wikipedia</a> - no OS is specified and it does not say how structures, floating-point or 64-bit numbers are handled, and it does not say where extra arguments are placed in case they do not fit in registers.</li>
  <li>Update: <a href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf" rel="nofollow noreferrer">Procedure Call Standard for the ARM Architecture</a> - finally I found a comprehensive document, but it doesn't say which operating systems follow the standard (or what variants or additional constraints those OSs might impose).</li>
  </ul>
  
  <p>The reason I ask is that I'd like to try using LLVM in WinCE to generate some simple code at run-time, but it only officially supports Linux.</p>