Date: Fri, 13 Mar 2020 17:24:33 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: A small llvm/clang patch for powerpc that Roman Divacky provided back in 2017-May: keep or revert? Message-ID: <C4C3CBB0-E694-4FD2-B00E-2F1E1A942AC2@yahoo.com> References: <C4C3CBB0-E694-4FD2-B00E-2F1E1A942AC2.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = /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 <=3D Reg && Reg <=3D PPC::CR4) - && !MustSaveCR) + && (!MustSaveCR && isPPC64)) continue; =20 // 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. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C4C3CBB0-E694-4FD2-B00E-2F1E1A942AC2>