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

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Thu Jun 10 16:08:02 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 319a27b4211f49f6c8808be2b193208b62fb53c0
      https://github.com/llvm/llvm-project/commit/319a27b4211f49f6c8808be2b193208b62fb53c0
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2021-06-10 (Thu, 10 Jun 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

(cherry picked from commit a7137b238a07d9399d3ae96c0b461571bd5aa8b2)




More information about the All-commits mailing list