From owner-freebsd-ppc@freebsd.org Mon Mar 18 20:31:28 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E1F8154CFE3 for ; Mon, 18 Mar 2019 20:31:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-3.consmr.mail.bf2.yahoo.com (sonic302-3.consmr.mail.bf2.yahoo.com [74.6.135.42]) (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 612E275261 for ; Mon, 18 Mar 2019 20:31:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: BFz4GnYVM1m6Q1ZLQEape9clE4oF5novl.3VxsZil_uLbpcDWHvmhd8Cr72nwVV gaItPihjnIwE5DLwGP8MK2j41V4A.TTpgQyJBlgg5wrmRyz0knkH1Anf4aLTfY0uae6N7HKr5__N PwtXc_pMd3F8Hn5X59JCTvNsJHoZMYBPIN.GACxRKX8GK7amIosuVDqCiOjkx8FN127RZ1kkKN8v 76oSk9_wTOuu8OjHKojqWh92HNs_z0OyCpHgLiog1PjCqm60Crxs4yGDWgHJQ_dUfalOlioPlCer Z2kfQbDM5ItX2lFE0FM8gHvfJKQ5jB3zhAt6XHnexcRp6_29ZVCDlGQeFSVM7fi.DZ02HcVnC2oc Wrw_qiVx6z4pbWTkI7yYSmlKD5fkRKpuwVBcFwS.7VvoTLBQIh39r76ZR_qk9dHco06JIKG4joT9 EHsykowpzJFlLh.xPIexHXtt53v8wYdIzuoQB5BnGJEFy44NhvsS7nf6C3fetJb0xPdpFw2ktc56 dm.27p5vpX5OIggmDrK0hWslUHBBltdbVxJCzBgFBmpxFfJDeP9oeY.8kI3Lsn.zCyZrUhswHkBl kqshHrtMnwaiJTJeYCKmslxCRTpU.ndzfcwBYNtJVh75SM5qPfUhYOpcZs_DNuJZNK7EVg7cSvWe AGawEjeyWS6GWkYSu9lrOdaYUEassK2aWj3Eqt2vsGmn1L.hH6QfF_eIujdfuvyW4AAUC70cGpv4 Wy1Qba4UCVs6huGf.6UXKgfOzg0TwZ8iaj3PTE7L3UUyTe5pjboJweRxdmtFxP3S0dKtuw3nrmBt gS0FTZb497K_WntH_93LFIY8PVkoWEqw8m8D4u2v.dVBPZXgBeat5l6BhoVXtTKk.0a5V0rGQWO2 .A9q3ycwQKunsQg16WDr.IwqK.wWzO52kEqv0jRSPozicN4k_dC91O_bcXlnZHbRTfWgZJb6SfAO _iFeXkjdXgJR62XOarW8MJCMg7LIkzlkQQm.R4OFo2mGItw6kp4BxFP92VuiCwg.V9z5ORLPplHk eq.7NrLD3K4DRAl5hWQetAegpt.NZnUGTYhpxWla_96mcsEvQv6tWlix5O8iivJkRYFGumDqjCOc KpY9bpiWtTs8- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Mon, 18 Mar 2019 20:31:20 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.115]) ([67.170.167.181]) by smtp420.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID d2d3b937956b2e03c6a976538c6597f8; Mon, 18 Mar 2019 20:31:20 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: llvm submittal 41050 created for powerpc64 C++ exception code generation: ld r2,40(r1) missing or skipped before bl __cxa_begin_catch code From: Mark Millard In-Reply-To: <795BBC02-6CE9-401E-8D9F-84FB9FB31364@yahoo.com> Date: Mon, 18 Mar 2019 13:31:18 -0700 Content-Transfer-Encoding: 7bit Message-Id: <16343810-DB93-4B7B-92C7-9985B94E3F22@yahoo.com> References: <0AD5D131-C5E3-424E-A276-D960ABDBDFCD@yahoo.com> <2429D922-3214-4D40-9616-56BC0CB93A15@yahoo.com> <795BBC02-6CE9-401E-8D9F-84FB9FB31364@yahoo.com> To: FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 612E275261 X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.41 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:26101, ipnet:74.6.128.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)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.95)[0.949,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.51)[ip: (5.08), ipnet: 74.6.128.0/21(1.41), asn: 26101(1.13), country: US(-0.07)]; NEURAL_SPAM_MEDIUM(0.98)[0.975,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.49)[0.485,0]; RCVD_IN_DNSWL_NONE(0.00)[42.135.6.74.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2019 20:31:28 -0000 [Looks like insufficient DW_CFA_* information is output and so insufficient code is executed.] On 2019-Mar-14, at 18:23, Mark Millard wrote: > . . . (dropping history) . . . (As usual, the history shows that I've been figuring things out as I go.) As I've looked into the code, operation, dwarfdump -v -v -v -F output and the like, it seems to come down to: A) Clang is not writing out any DW_CFA_* information for r2 anywhere. It needs to in at least some places and that information needs to be interpreted by the libunwind code. B) Clang may not be writing out various other DW_CFA_* things (and matching instructions in many cases) for some or all of: _Unwind_Resume _Unwind_Resume_or_Rethrow _Unwind_RaiseException _Unwind_FrocedUnwind [I'm sure of (A) but am less sure of what (B)'s details should be.] I did find the DQ_CFA_* related interpreter and its use. Also, using the likes of, # export LIBUNWIND_PRINT_UNWINDING="" # export LIBUNWIND_PRINT_APIS="" # export LIBUNWIND_PRINT_DWARF="" # ./a.out gives a good idea what is being done and in what sequence for the unwind activity. It may be that some of (B) might be because of libunwind not using sufficient built-ins that control part of how the code is generated for the likes of those 4 special routines (including, possibly, some of the DW_CFA_* information). For (A) in some or all the of (B) routines, it may be that some r2 related DF_CFA_* material needs to be written out even absent local code in order to tied things together. An example might be for picking up r2's value as it was before the plt_call code targeting _Unwind_Resume was executed in the a.out code. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)