From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id 3B98D38582A1; Wed, 31 Aug 2022 09:17:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B98D38582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661937441; bh=EVPOI9u/0CqmcqoHa50lwgS0e8bhvz/yu9n+ev5wkmg=; h=From:To:Subject:Date:From; b=jjzwVpNDPz77e6SgImjMfYDlFBI2ZI2Xbx6VlOOYMl/uCswdQjhK0HXz4+bTIYmga odV5EB2e7G0LQ1avhR3h/dgDhuvjh1LTq23njB9kBr49otvyB6142bytaFp24XtRSe VQfhHGH//zPxj9JG0z9870of5EQrK7AxhYowxxfo= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] Revert OG12-only parts of "dwarf: Multi-register CFI address support" X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/devel/omp/gcc-12 X-Git-Oldrev: 846797668e35664cdf6555c27c8b875cb54e6d66 X-Git-Newrev: 603945e5d5006459946f72e2ffa1b5fab11037f4 Message-Id: <20220831091721.3B98D38582A1@sourceware.org> Date: Wed, 31 Aug 2022 09:17:21 +0000 (GMT) List-Id: https://gcc.gnu.org/g:603945e5d5006459946f72e2ffa1b5fab11037f4 commit 603945e5d5006459946f72e2ffa1b5fab11037f4 Author: Tobias Burnus Date: Wed Aug 31 10:00:09 2022 +0200 Revert OG12-only parts of "dwarf: Multi-register CFI address support" "dwarf: Multi-register CFI address support." was commited to upstream (GCC12) as r12-5833-g13b6c7639cfdca892a3f02b63596b097e1839f38 It is based on an earlier version that was committed to OG11 as ce8e18474780aaae1abbfdde0543c948ae97da42 The OG11 version contained code that was not part of the upstream version as the approach changed; however, when OG12 was created, those were accidentally applied to OG12. This commit removes (reverts) the additional code, i.e. the OG12 commits: Reverts: commit 3405728e403ce7054f09e9a69846a57f680060db "dwarf: Multi-register CFI address support" gcc/ChangeLog: * dwarf2cfi.cc (get_cfa_from_loc_descr): Support register spans with DW_OP_piece and DW_OP_LLVM_piece_end. * dwarf2out.cc (build_cfa_loc): Support register spans. include/ChangeLog: * dwarf2.def (DW_OP_LLVM_piece_end): New extension operator. Reverts: commit 29ba2e4eeff0381e04a37a3c471c56cd887d2035 "Fix mis-merge of 'dwarf: Multi-register CFI address support'" gcc/ * dwarf2cfi.cc (get_cfa_from_loc_descr): Check op against DW_OP_bregx. Diff: --- gcc/ChangeLog.omp | 13 +++++++++++++ gcc/dwarf2cfi.cc | 27 +-------------------------- gcc/dwarf2out.cc | 4 ---- include/ChangeLog.omp | 7 +++++++ include/dwarf2.def | 6 ------ 5 files changed, 21 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index ff9d34b5c7c..e225f2721ab 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,16 @@ +2022-08-31 Tobias Burnus + + Revert: + 2022-06-30 Kwok Cheung Yeung + + * dwarf2cfi.cc (get_cfa_from_loc_descr): Check op against DW_OP_bregx. + + 2020-07-27 Andrew Stubbs + + * dwarf2cfi.cc (get_cfa_from_loc_descr): Support register spans + with DW_OP_piece and DW_OP_LLVM_piece_end. + * dwarf2out.cc (build_cfa_loc): Support register spans. + 2022-08-30 Tobias Burnus Backport from mainline: diff --git a/gcc/dwarf2cfi.cc b/gcc/dwarf2cfi.cc index 1359280f519..ab7c5cc5b27 100644 --- a/gcc/dwarf2cfi.cc +++ b/gcc/dwarf2cfi.cc @@ -540,10 +540,6 @@ get_cfa_from_loc_descr (dw_cfa_location *cfa, struct dw_loc_descr_node *loc) cfa->indirect = 0; cfa->reg.set_by_dwreg (INVALID_REGNUM); - /* Record previous register pieces here. */ - struct cfa_reg span; - span.set_by_dwreg (INVALID_REGNUM); - for (ptr = loc; ptr != NULL; ptr = ptr->dw_loc_next) { enum dwarf_location_atom op = ptr->dw_loc_opc; @@ -626,9 +622,7 @@ get_cfa_from_loc_descr (dw_cfa_location *cfa, struct dw_loc_descr_node *loc) = (op == DW_OP_bregx ? ptr->dw_loc_oprnd1.v.val_int : op - DW_OP_breg0); cfa->reg.set_by_dwreg (regno); - cfa->base_offset = (op == DW_OP_bregx - ? ptr->dw_loc_oprnd2.v.val_int - : ptr->dw_loc_oprnd1.v.val_int); + cfa->base_offset = ptr->dw_loc_oprnd1.v.val_int; } else { @@ -653,24 +647,6 @@ get_cfa_from_loc_descr (dw_cfa_location *cfa, struct dw_loc_descr_node *loc) cfa->offset = 0; } break; - case DW_OP_piece: - if (span.reg != INVALID_REGNUM) - { - /* We only support contiguous pieces, for now. */ - gcc_assert (cfa->reg.reg == span.reg + span.span); - gcc_assert (known_eq (ptr->dw_loc_oprnd1.v.val_int, - span.span_width)); - span.span++; - cfa->reg = span; - } - else - { - cfa->reg.span_width = ptr->dw_loc_oprnd1.v.val_int; - span = cfa->reg; - } - break; - case DW_OP_LLVM_piece_end: - break; case DW_OP_deref: cfa->indirect = 1; break; @@ -729,7 +705,6 @@ get_cfa_from_loc_descr (dw_cfa_location *cfa, struct dw_loc_descr_node *loc) /* The offset is already in place. */ break; case DW_OP_plus_uconst: - gcc_assert (known_eq (cfa->offset, 0)); cfa->offset = ptr->dw_loc_oprnd1.v.val_unsigned; break; default: diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 084d48c279b..8364f3e4ee4 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -2833,11 +2833,7 @@ build_cfa_loc (dw_cfa_location *cfa, poly_int64 offset) head = build_span_loc (cfa->reg); if (maybe_ne (offset, 0)) - { - add_loc_descr (&head, new_loc_descr (DW_OP_LLVM_piece_end, 0, 0)); - add_loc_descr (&head, new_loc_descr (DW_OP_deref, 0, 0)); loc_descr_plus_const (&head, offset); - } } else if (cfa->indirect) { diff --git a/include/ChangeLog.omp b/include/ChangeLog.omp index 167277b33e3..141ac55cf7a 100644 --- a/include/ChangeLog.omp +++ b/include/ChangeLog.omp @@ -1,3 +1,10 @@ +2022-08-31 Tobias Burnus + + Revert: + 2020-07-27 Andrew Stubbs + + * dwarf2.def (DW_OP_LLVM_piece_end): New extension operator. + 2022-07-07 Tobias Burnus Backport from mainline: diff --git a/include/dwarf2.def b/include/dwarf2.def index a3625a619bf..4214c80907a 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -704,12 +704,6 @@ DW_OP (DW_OP_PGI_omp_thread_num, 0xf8) to 0 except explicitly documented for one action. Please refer AArch64 DWARF ABI documentation for details. */ DW_OP (DW_OP_AARCH64_operation, 0xea) - -/* AMD GCN extensions (originally for LLVM). See - http://llvm.org/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.html */ -// This clashes with DW_OP_AARCH64_operation, so use an alias instead -// DW_OP (DW_OP_LLVM_piece_end, 0xea) -#define DW_OP_LLVM_piece_end DW_OP_AARCH64_operation DW_END_OP DW_FIRST_ATE (DW_ATE_void, 0x0)