<div dir="ltr">On 10 August 2013 12:37, Jeroen Hofstee <span dir="ltr"><<a href="mailto:llvm@myspectrum.nl" target="_blank">llvm@myspectrum.nl</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ The first issue is U-boot's use of global registers. As this is not supported by<br>
clang / llvm, it looks like a show stopper.</blockquote><div><br></div><div>Hi Jeroen,</div><div><br></div><div>Not sure what you mean by that. Is it just the use of the "register" modifier on variables, I'm not sure how the R9 reservation will help here... Otherwise, if U-boot uses R9 the same way the AAPCS states (static base or thread register), than turning it on ARM-wide seems the right fix.</div>
<div><br></div><div>If I got it right, you want to disable movt/movh for your specific case, so leaving it ARM-wide makes sense.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

IOS does this conditionally IsR9Reserved = ReserveR9 | !HasV6Ops; but I<br>
don't understand why, therefore I just left it untouched.<br></blockquote><div><br></div><div>I could be wrong but the AAPCS document hints that R9 usage is v6+, so I'm guessing HasV6Ops is important for all platforms, not just Darwin. But I don't have the old APCS document to show me that R9 can be used as GPR in pre-v6.<br>
</div><div><br></div><div>I think both flags can be set together, and leave the isTargetIOS() just for the SupportsTailCall, like:<br></div><div><br></div><div>  UseMovt = hasV6T2Ops() && ArmUseMOVT;<br></div><div>
  IsR9Reserved = ReserveR9 | !HasV6Ops;</div><div>  if (isTargetIOS())</div><div>    SupportsTailCall = !getTargetTriple().isOSVersionLT(5, 0);</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
patch attached (hopefully unified, it at least applies with patch -u -p0).<br></blockquote><div><br></div><div>Have you ran all tests? Test-suite? I suppose you'd have to test on both Linux and Darwin systems, but if you don't have access to them, I'll be happy to test on Linux, and other folks could test on Darwin.</div>
<div><br></div><div>cheers,<br></div><div>--renato</div></div></div></div>