[RFC] make arm-use-movt and arm-reserve-r9 options available for all arm

Renato Golin renato.golin at linaro.org
Sun Aug 11 13:58:06 PDT 2013


On 10 August 2013 12:37, Jeroen Hofstee <llvm at myspectrum.nl> wrote:

> + The first issue is U-boot's use of global registers. As this is not
> supported by
> clang / llvm, it looks like a show stopper.


Hi Jeroen,

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.

If I got it right, you want to disable movt/movh for your specific case, so
leaving it ARM-wide makes sense.



> IOS does this conditionally IsR9Reserved = ReserveR9 | !HasV6Ops; but I
> don't understand why, therefore I just left it untouched.
>

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.

I think both flags can be set together, and leave the isTargetIOS() just
for the SupportsTailCall, like:

  UseMovt = hasV6T2Ops() && ArmUseMOVT;
  IsR9Reserved = ReserveR9 | !HasV6Ops;
  if (isTargetIOS())
    SupportsTailCall = !getTargetTriple().isOSVersionLT(5, 0);


patch attached (hopefully unified, it at least applies with patch -u -p0).
>

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.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130811/6ff3b54f/attachment.html>


More information about the llvm-commits mailing list