From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 0E8373856DED for ; Mon, 16 May 2022 06:29:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0E8373856DED Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24G6Eu4g016629; Mon, 16 May 2022 06:29:37 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3g3h67g7tx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 06:29:37 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24G68MK5019659; Mon, 16 May 2022 06:29:35 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma06fra.de.ibm.com with ESMTP id 3g23pj1mj6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 06:29:35 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24G6TXmc49938908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 May 2022 06:29:33 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A9385204F; Mon, 16 May 2022 06:29:33 +0000 (GMT) Received: from [9.171.50.157] (unknown [9.171.50.157]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id E956A5204E; Mon, 16 May 2022 06:29:32 +0000 (GMT) Message-ID: <7d266787-9a64-07e6-bf7b-1bd01119517c@linux.ibm.com> Date: Mon, 16 May 2022 08:29:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: gcc@gcc.gnu.org From: Andreas Krebbel Subject: CFI for saved argument registers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: zf_jkeMgrJWQs_sWynEiitaTy93RM1V1 X-Proofpoint-GUID: zf_jkeMgrJWQs_sWynEiitaTy93RM1V1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-15_11,2022-05-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 adultscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 phishscore=0 bulkscore=0 malwarescore=0 mlxlogscore=512 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205160032 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 06:29:39 -0000 Hi, I'm trying to provide a simple dwarf unwinder with access to the argument register content. The goal is to make this information available for optimized code without having to access debug information for things like call site args. The extra overhead of saving the values to the stack is acceptable in that case. For that purpose I save the argument registers to the stack as we would do for a variable argument lists. But this time I also provide the CFI to allow the unwinder to locate the save slots. Since I never actually intend to restore the content there is no matching cfi_restore for the cfi_offset and dwarf2cfi complains about the traces being inconsistent because of that. I couldn't find a way to prevent this. The only way I see right now is adding a new reg note to invalidate the save information in the reg_save array in dwarf2cfi. Would this be acceptable? Is there perhaps an easier way to achieve that? Bye, Andreas