Make MicroBlaze support DWARF EH (old Xilinx patch, needed for glibc build).
commit81aab124bc697a87ad492d4cd3380599c0e0747e
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Jan 2017 20:54:34 +0000 (6 20:54 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Jan 2017 20:54:34 +0000 (6 20:54 +0000)
treebf1a938e1e5e9e5426bda271978925b3fea8de59
parent4004d223e672d4f04a8852016989072931d8800f
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244183 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/common/config/microblaze/microblaze-common.c
gcc/config/microblaze/microblaze-protos.h
gcc/config/microblaze/microblaze.c
gcc/config/microblaze/microblaze.h
gcc/config/microblaze/microblaze.md