[all-commits] [llvm/llvm-project] b294e0: [PowerPC] Fix for PC Relative call protocol
Kamau Bridgeman via All-commits
all-commits at lists.llvm.org
Wed Jul 1 05:09:25 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b294e00fb079600f337f479eb29fc27058228302
https://github.com/llvm/llvm-project/commit/b294e00fb079600f337f479eb29fc27058228302
Author: Stefan Pintilie <stefanp at ca.ibm.com>
Date: 2020-07-01 (Wed, 01 Jul 2020)
Changed paths:
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
A llvm/test/CodeGen/PowerPC/func-alias.ll
M llvm/test/CodeGen/PowerPC/ifunc.ll
A llvm/test/CodeGen/PowerPC/pcrel-local-caller-toc.ll
Log Message:
-----------
[PowerPC] Fix for PC Relative call protocol
The situation where the caller uses a TOC and the callee does not
but is marked as clobbers the TOC (st_other=1) was not being compiled
correctly if both functions where in the same object file.
The call site where we had `callee` was missing a nop after the call.
This is because it was assumed that since the two functions where in
the same DSO they would be sharing a TOC. This is not the case if the
callee uses PC Relative because in that case it may clobber the TOC.
This patch makes sure that we add the cnop correctly so that the
linker has a place to restore the TOC.
Reviewers: sfertile, NeHuang, saghir
Differential Revision: https://reviews.llvm.org/D81126
More information about the All-commits
mailing list