Date: Mon, 18 Mar 2019 13:31:18 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> 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 Message-ID: <16343810-DB93-4B7B-92C7-9985B94E3F22@yahoo.com> In-Reply-To: <795BBC02-6CE9-401E-8D9F-84FB9FB31364@yahoo.com> References: <0AD5D131-C5E3-424E-A276-D960ABDBDFCD@yahoo.com> <2429D922-3214-4D40-9616-56BC0CB93A15@yahoo.com> <795BBC02-6CE9-401E-8D9F-84FB9FB31364@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[Looks like insufficient DW_CFA_* information is output and so insufficient code is executed.] On 2019-Mar-14, at 18:23, Mark Millard <marklmi at yahoo.com> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16343810-DB93-4B7B-92C7-9985B94E3F22>