[all-commits] [llvm/llvm-project] a7137b: [BPF] Add support for floats and doubles

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Fri Mar 5 06:11:29 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a7137b238a07d9399d3ae96c0b461571bd5aa8b2
      https://github.com/llvm/llvm-project/commit/a7137b238a07d9399d3ae96c0b461571bd5aa8b2
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M llvm/lib/Target/BPF/BTF.def
    M llvm/lib/Target/BPF/BTFDebug.cpp
    M llvm/lib/Target/BPF/BTFDebug.h
    A llvm/test/CodeGen/BPF/BTF/double.ll
    A llvm/test/CodeGen/BPF/BTF/float.ll

  Log Message:
  -----------
  [BPF] Add support for floats and doubles

Some BPF programs compiled on s390 fail to load, because s390
arch-specific linux headers contain float and double types. At the
moment there is no BTF_KIND for floats and doubles, so the release
version of LLVM ends up emitting type id 0 for them, which the
in-kernel verifier does not accept.

Introduce support for such types to libbpf by representing them using
the new BTF_KIND_FLOAT.

Reviewed By: yonghong-song

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




More information about the All-commits mailing list