From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by sourceware.org (Postfix) with ESMTPS id 99CF83858D35 for ; Tue, 4 Jul 2023 01:06:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99CF83858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1688432792; x=1719968792; h=from:to:cc:subject:mime-version: content-transfer-encoding:message-id:date; bh=zesqSjpGc8SvwICToWLvOrHx77I69M358EW2aBcyBgM=; b=eGuHrpPEYE8sA+cnYzApQOut1iwB7iUI/68eqMdXOLOi4dq/SGXZ6X4n w2iBjTQ+chtqe5Ry454yzqRvHopju3hBDZvFuqpWX648o4KnGw+KQEexd tVl9qPiVJtWRjw9kvjNE/xjybFVW9DYTVk4d44p14gu6UxvKrT1uKtKjg bWHBoL0z9wS1wpEx3h82ukEiRWbFgCq33Vc/GdSF5Zz85ghz1pDZLKfW1 pgcRSGsmNx5w5kn1T1R7IrzagV5TAcRAvMNXEMX6Ig4xYqKYJmeCT9I4G R+MSDEyuk7UiDut9/uq2JcbtnbNwrKEmpWaxPiB90EME9BdxsmNKaKe9F w==; From: Hans-Peter Nilsson To: CC: Subject: [committed] dwarf2out.cc (mem_loc_descriptor): Handle BITREVERSE MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20230704010629.31B8220418@pchp3.se.axis.com> Date: Tue, 4 Jul 2023 03:06:29 +0200 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Committed as obvious after regtest for cris-elf together with the "next" patch, that replaces unspec CRIS_UNSPEC_SWAP_BITS with bitreverse (which hit the ICE). -- >8 -- This seems to have just been overlooked when introducing BITREVERSE. Note that the function name mem_loc_descriptor is a misnomer; it'd better be called rtx_loc_descriptor or any_loc_descriptor, because "anything" RTX can end up here. To wit, when introducing new RTL that ends up as code or for other reasons appear in debug expressions, don't forget to update this function. This was observed by building libstdc+++ for cris-elf with a patch replacing the CRIS_UNSPEC_SWAP_BITS by bitreverse, as hitting the internal-error-generating default case. Looking at the BSWAP, POPCOUNT and ROTATE cases, BITREVERSE can probably be fully expressed as DWARF code if need be, but let's start with not throwing an internal error. gcc: * dwarf2out.cc (mem_loc_descriptor): Handle BITREVERSE. --- gcc/dwarf2out.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 9112fc0c64b5..e973644102c0 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -16940,6 +16940,7 @@ mem_loc_descriptor (rtx rtl, machine_mode mode, case CLOBBER: case SMUL_HIGHPART: case UMUL_HIGHPART: + case BITREVERSE: break; case CONST_STRING: -- 2.30.2