Skip to content
Snippets Groups Projects
  • David Faust's avatar
    18d0fad7
    BTF: Support for BTF_KIND_FLOAT · 18d0fad7
    David Faust authored
    Add BTF_KIND_FLOAT, a new BTF type kind which has recently stabilized in
    the linux kernel [1]. This kind is used for encoding floating point
    types, and is of particular use when generating BTF for some s390
    arch-specific kernel headers.
    
    Also update some BTF tests which previously used floating point types to
    check correct behavior for types with no BTF representation.
    
    [1]: https://github.com/torvalds/linux/commit/b1828f0b04828aa8cccadf00a702f459caefeed9
    
    include/ChangeLog:
    
    	* btf.h (struct btf_type): Update bit usage comment.
    	(BTF_INFO_KIND): Update bit mask.
    	(BTF_KIND_FLOAT): New define.
    	(BTF_KIND_MAX): Update.
    
    gcc/ChangeLog:
    
    	* btfout.c (get_btf_kind): Support BTF_KIND_FLOAT.
    	(btf_asm_type): Likewise.
    
    gcc/testsuite/ChangeLog:
    
    	* gcc.dg/debug/btf/btf-float-1.c: New test.
    	* gcc.dg/debug/btf/btf-function-3.c: Use different unrepresentable type.
    	* gcc.dg/debug/btf/btf-struct-2.c: Likewise.
    	* gcc.dg/debug/btf/btf-variables-2.c: Likewise.
    18d0fad7
    History
    BTF: Support for BTF_KIND_FLOAT
    David Faust authored
    Add BTF_KIND_FLOAT, a new BTF type kind which has recently stabilized in
    the linux kernel [1]. This kind is used for encoding floating point
    types, and is of particular use when generating BTF for some s390
    arch-specific kernel headers.
    
    Also update some BTF tests which previously used floating point types to
    check correct behavior for types with no BTF representation.
    
    [1]: https://github.com/torvalds/linux/commit/b1828f0b04828aa8cccadf00a702f459caefeed9
    
    include/ChangeLog:
    
    	* btf.h (struct btf_type): Update bit usage comment.
    	(BTF_INFO_KIND): Update bit mask.
    	(BTF_KIND_FLOAT): New define.
    	(BTF_KIND_MAX): Update.
    
    gcc/ChangeLog:
    
    	* btfout.c (get_btf_kind): Support BTF_KIND_FLOAT.
    	(btf_asm_type): Likewise.
    
    gcc/testsuite/ChangeLog:
    
    	* gcc.dg/debug/btf/btf-float-1.c: New test.
    	* gcc.dg/debug/btf/btf-function-3.c: Use different unrepresentable type.
    	* gcc.dg/debug/btf/btf-struct-2.c: Likewise.
    	* gcc.dg/debug/btf/btf-variables-2.c: Likewise.