8548 CPU is GCC's name for the e500v2, so accept this in clang. The
e500v2 doesn't support lwsync, so define NO_LWSYNC for this as well,
as GCC does.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40720 Build 40850: arc lint + arc unit
Event Timeline
I made 8548 an alias in clang to e500, because e500 is recognized in llvm as a CPU, so gets us the feature list and, more importantly, the instruction scheduler.
@jhibbits Should not the test in test/Preprocessor/init.c also ensure that __SPE__ and __NO_FPRS__ macros are defined with CPU 8548? The rest looks good to me, thank you.
@vit9696 The only thing GCC defines for mcpu=8548 is NO_LWSYNC, the SPE-specific #defines are from -mspe. That said, since I explicitly do enable SPE for e500 CPU, I guess it makes sense to add it to the test.
Yes, that's the point, since 8548 is an alias.
A side note regarding SPE support. I am currently upgrading to LLVM 9.0 and I discovered that this patch was not committed anyhow at all:
https://reviews.llvm.org/D54583#1444288
Yeah, I noticed that after I committed it. Problem is, to submit that for review, I need a valid reduced test case., and my laziness/busy-ness has prevented me from creating a reduced test case in LLVM language.
Make 8548 actually denote e500 LLVM target, add SPE checks to 8548 preprocessor test.
I noticed a typo in the file, but the rest looks good now.
clang/lib/Driver/ToolChains/Arch/PPC.cpp | ||
---|---|---|
61 | That looks like a typo to me. There is one more 8548 case above. |
clang/lib/Driver/ToolChains/Arch/PPC.cpp | ||
---|---|---|
61 | You're right, I missed that I added it above already. |
That looks like a typo to me. There is one more 8548 case above.