Make MicroBlaze support DWARF EH (old Xilinx patch, needed for glibc build).
This patch, taken from
<https://git.busybox.net/buildroot/tree/package/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch>
and with a few formatting cleanups and an update for the removal of
gen_rtx_raw_REG, enables DWARF EH support for MicroBlaze.
This is needed for building glibc with a compiler that includes shared
libgcc; right now all glibc builds for MicroBlaze are failing with my
bot for lack of this support. (It's dubious if we should have glibc
ports at all where required support is missing in FSF GCC.)
Tested building glibc with build-many-glibcs.py. I have *not* done
any other testing or any execution testing for MicroBlaze.
2017-01-06 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
David Holsgrove <david.holsgrove@xilinx.com>
* common/config/microblaze/microblaze-common.c
(TARGET_EXCEPT_UNWIND_INFO): Remove.
* config/microblaze/microblaze-protos.h (microblaze_eh_return):
New prototype.
* config/microblaze/microblaze.c (microblaze_must_save_register)
(microblaze_expand_epilogue, microblaze_return_addr): Handle
calls_eh_return.
(microblaze_eh_return): New function.
* config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
(EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
(EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
* config/microblaze/microblaze.md (eh_return): New pattern.
Co-Authored-By: David Holsgrove <david.holsgrove@xilinx.com>
From-SVN: r244183