[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

Justin Hibbits via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 27 20:27:58 PDT 2019


jhibbits marked an inline comment as done.
jhibbits added inline comments.


================
Comment at: lib/Basic/Targets/PPC.cpp:318
+  Features["spe"] = llvm::StringSwitch<bool>(CPU)
+                        .Case("e500", true)
+                        .Case("8548", true)
----------------
vit9696 wrote:
> nemanjai wrote:
> > The `e500v2` that you added doesn't support SPE?
> I rechecked the docs, and there is no e500v2 option for -mcpu in GCC:
> https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options.
> 
> GCC defines 8540 (currently missing) and 8548, which I suppose we should support with default switches for SPE. As for other options, there also is -me500, which enables SPE, and -me500mc, which does not. I believe the need of these options is discussible.
> 
> The author of the patch may have his own thoughts behind, but I am not sure if e500, e500v1, or e500v2 should be used as mcpu switches at all. I am not against it if it makes things more convenient though.
I decided it's better to match gcc in this regard, and support only 8548 (8540 is e500v1, which this SPE codegen does not support).


Repository:
  rC Clang

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

https://reviews.llvm.org/D49754





More information about the cfe-commits mailing list