[PATCH] D73664: [PowerPC][Future] Add Support For Functions That Do Not Use A TOC.

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 05:29:29 PST 2020


nemanjai added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp:246
+      return 1 << ELF::STO_PPC64_LOCAL_BIT;
+    case 4:
+      return 2 << ELF::STO_PPC64_LOCAL_BIT;
----------------
anil9 wrote:
> If you really need to use log2, you can separate out the case of 0,1 and then use log2 or 4,8 ..... 64. 
> But yes the error message still has to specify more information since 2 & 128 and above are not allowed and also 2^-(inf) = 0 is allowed.
Right, yes the two cases should be handled separately.

I definitely do not agree about the error message. There is no compelling reason to diverge from system tools for things like this. Furthermore, there is absolutely no issue with not accepting some powers of two. The message after all says that the expression is not a **valid** power of 2, not that the expression is not a power of 2.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73664/new/

https://reviews.llvm.org/D73664





More information about the llvm-commits mailing list