On 11/11/16 22:12, Joseph Myers wrote:
On Fri, 11 Nov 2016, Jiong Wang wrote:

There are two ways of introducing these AArch64 support:
   * Introducing a few target macros so we can customize functions like
     uw_init_context, uw_install_context etc.
   * Use target private unwind-dw2 implementation, i.e duplicate the generic
     unwind-dw2.c into target config directory and use it instead of generic
one.
     This is current used by IA64 and CR16 is using.

I am not sure which approach is the convention in libgcc, Ian, any comments on
this?
Although as you note duplication has been used before, I think it should
be strongly discouraged; duplicated files are unlikely to be kept up to
date with relevant changes to the main file.


Hi Joseph,

  The changes AArch64 needs to do on top of the generic unwind-dw2.c is at:

     https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01167.html

  If I don't duplicate unwind-dw2.c, then I need to guard those changes with
something like __aarch64__ or introduce several target macros.  It looks to me
only the hunk that supports AArch64 DWARF operations worth a target macro,
something like MD_DW_OP_HANDLER, for the other changes they are quite scattered,
for example the field extension on "struct _Unwind_Context" and the relax of
assertion on uw_install_context_1.

  Any comments on this?

  Thanks.

Regards,
Jiong


Reply via email to