From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 22AB03860766 for ; Mon, 22 Apr 2024 15:59:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 22AB03860766 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 22AB03860766 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713801562; cv=none; b=o4SPkClrc/nDobfhYf2+CI+Sas2ikr2lXo2LUay/GvaaASs4aGxVakit9WfwWRHGRJPMrVB4ki3vW0GQSGbdxIz7fpFM0RL6FJaZhrCopmBJYVEkPzY4BHBNKAzoYyZGcUCEdIPqr9dmZj7lEidt6c/A8ef4dIU37WmZvchXYYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713801562; c=relaxed/simple; bh=TLX6lMeconbBO70tkHXDYs7fmB0POWxNnOUnyaYKchA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Y6Q04PXpx+uO1rBunpUUP2QByFqIYSkKeE6l+A1btWUx8p/biwmhYCmFlqBUocfgJd+okExEQfe/WdkPRIIdd06wnOasD6TaXGZ4R6h0ItdH+AyBbOHI6iU7pqE/8OLO5O7gx2V9vIgC3EC/eCQhHyV753ErC7GtRAftLDvPY98= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43MExHin014906; Mon, 22 Apr 2024 15:59:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=zwZMeIg2DDyxUV1oo7fh9G6ddUOQmQ+kQvqmCIX9by0=; b=MZv9rtJ9hT2RbHKeyzDOZM/AIDmwFtjf9GFvzPMa7L7Ms2Jt9+KCw6uwRZUD4CuHvDWM ZffZu5komTWohC/cnSZV20eg8XWa2dqDYCGAe/lRtWWHWOWKSBFyboEt7iKJM/WQIICo cgLj/RFgYXFdw32jsPFKTf6xmSEnm8M81C+XdIyodyRLdEfJMpe5yb9cKiUjjeXwQN83 pQLaKQe5B3MhKTTb5Q3YTZ8mlrEayKyQGa//h/NE8zryJBQXp+jxGIEECTCqE66igaWJ o5nDODgD00ar/zB16qUibZfjUhqJbT/obFtek0XNq92NMGHBrd+oBXhHaq1+H54rjItK lQ== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xnsyx85qg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 15:59:17 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43MEnCEl005355; Mon, 22 Apr 2024 15:59:16 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmx3c7afs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 15:59:16 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43MFx75x13238666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Apr 2024 15:59:09 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 76E772004E; Mon, 22 Apr 2024 15:59:07 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B39720043; Mon, 22 Apr 2024 15:59:07 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 22 Apr 2024 15:59:07 +0000 (GMT) From: Jens Remus To: binutils@sourceware.org, Indu Bhagat Cc: Jens Remus , Andreas Krebbel Subject: [RFC PATCH 0/1] sframe: Represent FP without RA on stack (bitmap) Date: Mon, 22 Apr 2024 17:59:04 +0200 Message-Id: <20240422155905.2497883-1-jremus@linux.ibm.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: lg7r6CyfMLMYBCwfcIR9zSAeEAqzMzVF X-Proofpoint-GUID: lg7r6CyfMLMYBCwfcIR9zSAeEAqzMzVF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-22_09,2024-04-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 clxscore=1015 malwarescore=0 mlxlogscore=239 impostorscore=0 spamscore=0 priorityscore=1501 mlxscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404220067 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP 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: This patch series adds support in SFrame to represent the frame pointer (FP) without the return address (RA) being saved on the stack (and/or on s390x in another register). This is the second of two proposed alternatives: 1. The alternative patch series uses a dummy padding offset (invalid offset from CFA value of zero) as RA offset to represent FP without RA on saved on the stack. 2. This patch series changes the SFrame FRE count field into a bitmap, to convey which offsets follow the FRE. Note that it currently applies on top of my v3 patch series series that adds initial support to generate .sframe from CFI directives on s390x, although it is independent of that. A SFrame FRE currently has a 4-bit field containing the offset count that follow the FRE. While this could account for up to 15 offsets (or 16, when excluding the mandatory CFA offset from CFA base register), it cannot represent which of these offsets actually follow. Redefining the 4-bit count field into a 4-bit offset bitmap allows to track up to 4 offsets (or 5, when excluding the mandatory CFA offset from CFA base register). The main downside of this approach is that this is potentially a major change to the SFrame V2 format, which may require a bump to V3. The benefits are that (1) it does not add any dummy padding offsets, which would unnecessarily add bloat to the SFrame information, and that (2) it does not change any of the external SFrame API. Using a lookup table the bitmap can easily be translated into an offset count. Similar any logic that checks the presence of an offset can easily be implemented using a bit test. Note that there is a minor implementation issue with regards to the internal API methods (callbacks), due to the change in SFrame format changing a method argument from count to bitmap. Additionally this initial implementation lacks better naming of the tracked register IDs and any update of the SFrame format specification. Thanks and regards, Jens Jens Remus (1): sframe: Represent FP without RA on stack gas/gen-sframe.c | 66 ++++++++++++++++++++++++++++------------------ include/sframe.h | 13 ++++++--- libsframe/sframe.c | 51 +++++++++++++++++++++++++++-------- 3 files changed, 90 insertions(+), 40 deletions(-) -- 2.40.1