[ARM/FDPIC v6 12/24] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp
authorChristophe Lyon <christophe.lyon@st.com>
Tue, 10 Sep 2019 07:56:43 +0000 (09:56 +0200)
committerChristophe Lyon <clyon@gcc.gnu.org>
Tue, 10 Sep 2019 07:56:43 +0000 (09:56 +0200)
commitbb33a88e3d4746470d3f969c6d764d20d726f9f1
tree47a9200cf7cbd1df26092ec6909cc05b0c2796a3
parentae1152e5a01301c9dfec42fc5c117a9b782e353e
[ARM/FDPIC v6 12/24] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp

We call __aeabi_read_tp() to get the thread pointer. Since this is a
function call, we have to restore the FDPIC register afterwards.

2019-09-10  Christophe Lyon  <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>

gcc/
* config/arm/arm.c (arm_load_tp): Add FDPIC support.
* config/arm/arm.md (FDPIC_REGNUM): New constant.
(load_tp_soft_fdpic): New pattern.
(load_tp_soft): Disable in FDPIC mode.

Co-Authored-By: Mickaël Guêné <mickael.guene@st.com>
From-SVN: r275574
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md