From owner-freebsd-toolchain@freebsd.org Sat Mar 14 00:24:41 2020 Return-Path: Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 823F226F1DD for ; Sat, 14 Mar 2020 00:24:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-22.consmr.mail.gq1.yahoo.com (sonic310-22.consmr.mail.gq1.yahoo.com [98.137.69.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48fNc70DpMz3Q6X for ; Sat, 14 Mar 2020 00:24:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: S0ihvvcVM1lwfrgJy9UEw77hkLprdbIsLnl7cW52.VO4ZxMixZHQofk2HS7Kv5y GLUwPfAY3TX7OQnKjTrs381.wLM1q8ELTox4wNWNgj0CsX5Xil9SnKvxSzkT6zPjsj8HdqOmCB28 fXtApIXr2W39mQcPU8qBk3QpV_nlPepgij9T3ElPy5.NN.qBqVm9Q6LrwP_NkhdgJKz8uafOOZ3i febNpPXjsFV7IATqWk9LiY66Kquj1VCtoEyy1h7FHedMhDK7jpndGXcnWetnTb20phaWdf2.Kzbd td.PIhwfkwkeeNFRUZ_kVoKB.5A_WNzMHYGUJHlMpoaDPP6Bgmj7IM0r5FNdVg1nGQLsd4S4ckTI jS6oL.4Z6JNpmr1DDnmmbQBUdtcYygEHPg_INcGQrm6XYbK7511.kAYiQavyGl6gTM8pdrROKa0N OfMnKol1.B2I5Iv.HgC4uLqCoYtLHj.ZMMhcf2v0kxV8sUgUriIBeYOUbGWS_ftbEcc3clGavspq Rf2pv7BCt5EMLRLQBFKn1RGLbFiXG_N9t.mCZgKPlMmNbvcYP5LPvPmgKPtiLZ0MKhcQC4YeYiyF nYoD6UXvRbFjClcHWuceK6hXNPmtC2NGVKP5V.gZHWBoNY88JJaXCQqv1i.5VYoNi9BCMppMJ.wj poUVyg9hHfJq5AOROHcI7euxsj9zilzYC7VfbAEBIFk5fhqMnw5HsMF6DJYVjZhR0HLKFuBnj2g1 xvxKDP.EeEDXcPwfk.blHqBUSfT67O0jtMDW7bpmjlBPv7fg465ogWvSuDwhBcJP.j4OesRGzE5O zvk95e1HKS2j8TIhvPZatZFNSz8pnm0PfiCew5_r0PAYNjJ.jqVsQZdYxCWGLxF.urhON0FDVSXk .yntLO__V0eXVl8vgZKbZ8vz2P9LpgW0cRYx4TzvxNJKLFSIpXxm9oGEQjTDmXziIX2lrsJYoP0B x_vBu98iaNUDLd_e.wf_YUH_2uFupkmRXQPYghEchCmRH_RbfzHqBhtSPwrE6OsXcid6tLcnaycc yGip1I4ufQ.je3hPSkyAzWRejTR4NkNF4iq8hIo89qC6M93tvjjypeBhQ0XwPcrQJRvyztAg00EJ 9jpdwMOxpZ4WrQ4DDCFgAaN8XvudBCiEin_knyb1qQWXscTj_uIH2ck2w7I_mZ4oMiYGBqPBalnl J.iYtlsfy10NjbnmUEkzHyt3iIbSMbm.611kpzHnqnj_NVtsq.mIspXFItPtduydWHnCY77logMi nFAe91eshdIVoGEu2PyEQNmegTTKLlO06IkqC4yBOZ4Pd69a9YBkt6SYTuH9IbACn9HVx5C98wOq i6L7I.hDS447RNOzbxQz.Jwu6VDbgvoPqqHe6Z.ExgI0hGHJnojRI8SZ2SnbA0MW4j_4dOaapCK7 al2dr_hVjouh9vOsL9WBnQrut55afCD_.erDdVoO_25P7nP11QOIEKQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Sat, 14 Mar 2020 00:24:36 +0000 Received: by smtp428.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 75e9316f13a321d104556efd77859f08; Sat, 14 Mar 2020 00:24:34 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: A small llvm/clang patch for powerpc that Roman Divacky provided back in 2017-May: keep or revert? Message-Id: Date: Fri, 13 Mar 2020 17:24:33 -0700 To: FreeBSD PowerPC ML , FreeBSD Toolchain X-Mailer: Apple Mail (2.3608.60.0.2.5) References: X-Rspamd-Queue-Id: 48fNc70DpMz3Q6X X-Spamd-Bar: / X-Spamd-Result: default: False [0.44 / 15.00]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.07)[-0.073,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-0.22), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.01)[0.010,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[148.69.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 00:24:41 -0000 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)