[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)
Maryam Moghadas via cfe-commits
cfe-commits at lists.llvm.org
Fri May 24 11:48:59 PDT 2024
maryammo wrote:
> > So PPC64 can use ELFv2 for Triple::OpenBSD. We probably want to diagnose this OS for PPC64, since with ELFv2 we might emit separate local and global entry points which means only certain values can be passed to -fpatchable-function-entry option.
>
> For targets with ABI elfv2 which means there are dual entries, this patch can generate expected patchable entry: For -mtriple=powerpc64-unknown-freebsd-unknown
>
> ```
> .Ltmp0:
> nop
> nop
> f3: # @f3
> .Lfunc_begin0:
> .cfi_startproc
> .Lfunc_gep0:
> addis 2, 12, .TOC.-.Lfunc_gep0 at ha
> addi 2, 2, .TOC.-.Lfunc_gep0 at l
> .Lfunc_lep0:
> .localentry f3, .Lfunc_lep0-.Lfunc_gep0
> # %bb.0: # %entry
> nop
> ```
Ok, so there is no NOPs between lep and gep. Thanks for verifying.
https://github.com/llvm/llvm-project/pull/92997
More information about the cfe-commits
mailing list