A small llvm/clang patch for powerpc that Roman Divacky provided back in 2017-May: keep or revert?
Mark Millard
marklmi at yahoo.com
Sat Mar 14 00:24:41 UTC 2020
I've tracked applying Roman Divacky's patch below
for powerpc for nearly 3 years. (I had to follow
some restructuring and the below is from a base of
head -r358510 .) The patch never made it into a
llvm/clang update that I've seen.
# svnlite diff /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Index: /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
===================================================================
--- /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (revision 358966)
+++ /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (working copy)
@@ -1326,7 +1326,7 @@
// For SVR4, don't emit a move for the CR spill slot if we haven't
// spilled CRs.
if (isSVR4ABI && (PPC::CR2 <= Reg && Reg <= PPC::CR4)
- && !MustSaveCR)
+ && (!MustSaveCR && isPPC64))
continue;
// For 64-bit SVR4 when we have spilled CRs, the spill location
So !isPPC64 would not "continue" but instead flow to the following
code for dealing with spills of CRs for 32-bit powerpc. Roman
wrote at the time:
"I believe this should make llvm emit the cfi instructions for the
unwind case you mentioned in the llvm PRs."
Is this still relevant for the modern head and later FreeBSD context?
Is it still appropriate for llvm (even if it is not needed for head)?
If it is not relevant to head, then I could revert the patch in my
environment.
If it is relevant to llvm, I'd probably try to contact Roman to
remind him of the patch in case he would want it in llvm.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-ppc
mailing list