]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add DW_OP_LLVM_select_bit_piece DWARF operation
authorZoran Zaric <zoran.zaric@amd.com>
Wed, 13 Oct 2021 11:55:50 +0000 (12:55 +0100)
committerZoran Zaric <zoran.zaric@amd.com>
Fri, 5 Nov 2021 11:48:16 +0000 (11:48 +0000)
commite56df7452dd7b119bf3fa09a3de830b5473c8503
treeb92b5ad167febd14c37a3091cc188aa5d3a05d32
parent90c993b5a4cda4cfb0d2c0e1359d36d5749a5698
Add DW_OP_LLVM_select_bit_piece DWARF operation

Second more complex DWARF expression operation, that is usefull for
SIMD/SIMT like architectures is DW_OP_LLVM_select_bit_piece. This
operation pops three stack entries, where the first must be an integral
type value that represents a bit mask, the second must be a location
description that represents the one-location description and the third
must be a location description that represents the zero-location
description.

Resulting composite location description contains a given number of
pieces of a given bit size, created with parts from either of the two
location description, based on the bit mask.

gdb/ChangeLog:

        * compile/compile-loc2c.c (compute_stack_depth_worker): Add
        new DW_OP_LLVM_select_bit_piece operation support.
        * dwarf2/expr.c (dwarf_expr_context::create_select_composite):
        New method that creates the select bit piece composite.
        (dwarf_location::slice): New method.
        (dwarf_composite::slice): New method.
        (dwarf_expr_context::execute_stack_op): Add new
        DW_OP_LLVM_select_bit_piece operation support.
        * dwarf2/loc.c (dwarf2_get_symbol_read_needs): Add new
        DW_OP_LLVM_select_bit_piece operation support.
        (disassemble_dwarf_expression): Add new
        DW_OP_LLVM_select_bit_piece operation support.

include/ChangeLog:

        * dwarf2.def: Add new DW_OP_LLVM_select_bit_piece enumeration.

gdb/testsuite/ChangeLog:

        * gdb.dwarf2/dw2-llvm-select-bit-piece.exp: New test.
        * lib/dwarf.exp: Add new DW_OP_LLVM_select_bit_piece operation
        support.
gdb/compile/compile-loc2c.c
gdb/dwarf2/expr.c
gdb/dwarf2/loc.c
gdb/testsuite/gdb.dwarf2/dw2-llvm-select-bit-piece.exp [new file with mode: 0644]
gdb/testsuite/lib/dwarf.exp
include/dwarf2.def