Files
clang-p2996/lld/test/ELF/Inputs/ppc64-func-local-entry.s
Zaara Syeda 82dd99e08e [PPC64] Add offset to local entry point when calling functions without plt
PPC64 V2 ABI describes two entry points to a function. The global entry point
sets up the TOC base pointer. When calling a local function, the call should
branch to the local entry point rather than the global entry point.
Section 3.4.1 describes using the 3 most significant bits of the st_other
field to find out how many instructions there are between the local and global
entry point. This patch adds the correct offset required to branch to the local
entry point of a function.

Differential Revision: https://reviews.llvm.org/D45729

llvm-svn: 331046
2018-04-27 15:41:19 +00:00

17 lines
435 B
ArmAsm

.text
.abiversion 2
.globl foo_external_same # -- Begin function foo_external_same
.p2align 4
.type foo_external_same,@function
foo_external_same: # @foo_external_same
.Lfunc_begin0:
# %bb.0: # %entry
add 3, 4, 3
extsw 3, 3
blr
.long 0
.quad 0
.Lfunc_end0:
.size foo_external_same, .Lfunc_end0-.Lfunc_begin0
# -- End function