[PATCH] D91489: BPF: make __builtin_btf_type_id() return 64bit int
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 15 22:14:16 PST 2020
yonghong-song added inline comments.
================
Comment at: llvm/lib/Target/BPF/BTFDebug.cpp:1230
+ Reloc == BPFCoreSharedInfo::BTF_TYPE_ID_REMOTE)
OutMI.setOpcode(BPF::LD_imm64);
else
----------------
anakryiko wrote:
> yonghong-song wrote:
> > ast wrote:
> > > libbpf would need to support both (ld_imm64 and mov32), right?
> > all selftests passed. I suspect libbpf already supports both ld_imm64 and mov32...
> there is no need to make BTF_TYPE_ID_LOCAL to return u64, but if it helps uniformity, then why not.
>
> libbpf does support ldimm64 in general, but I'll need to extend this specifically for BTF_TYPE_ID_REMOTE to record module BTF ID in upper 32 bits. For now it will be just zeroes, which works fine.
yes, uniformity is why I also return u64 for BTF_TYPE_ID_LOCAL.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91489/new/
https://reviews.llvm.org/D91489
More information about the llvm-commits
mailing list