[Hexagon] Generate PIC-specific versions of save/restore routines
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 24 Mar 2016 19:18:48 +0000 (19:18 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 24 Mar 2016 19:18:48 +0000 (19:18 +0000)
commit181fdbd174861a9001ec481a500221ea0f6a6b40
treee12081c17901d7ec6cc3cb17282b9e1e4b2de77e
parent6642bb3337457b3c692b1aca56d3c8ee0c46c7a4
[Hexagon] Generate PIC-specific versions of save/restore routines

In PIC mode, the registers R14, R15 and R28 are reserved for use by
the PLT handling code. This causes all functions to clobber these
registers. While this is not new for regular function calls, it does
also apply to save/restore functions, which do not follow the standard
ABI conventions with respect to the volatile/non-volatile registers.

Patch by Jyotsna Verma.

llvm-svn: 264324
llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td
llvm/test/CodeGen/Hexagon/pic-regusage.ll [new file with mode: 0644]