From patchwork Sat Dec 17 06:41:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 34187 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1382101wrn; Fri, 16 Dec 2022 22:42:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf75+QaNj4vsOpV7QEHfXfAm8WrseOcNJm8wal9x2PAMrnppKKgoh8VzhUS6mdY/azmyIdqG X-Received: by 2002:aa7:db10:0:b0:46c:ecb8:e703 with SMTP id t16-20020aa7db10000000b0046cecb8e703mr31063074eds.22.1671259334911; Fri, 16 Dec 2022 22:42:14 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x11-20020a05640226cb00b00458a650f3fasi4607119edd.409.2022.12.16.22.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 22:42:14 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=vNrzOypR; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6510A38A9097 for ; Sat, 17 Dec 2022 06:42:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6510A38A9097 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671259328; bh=RkdONes11SPD+OI+59O+XyObIMRr2IPRMBKjRGpxuhI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vNrzOypRg4kmHdjCfGW+KTgRkunrSFR39HryiUmFrjQd3hGjIiMr020SDb05SXQ0d Qhq8DNPzheEHW9bJoFMtPD/AoCJOhlAH86LufmT4+dx5YsKY+u8X/fY2vf6hBKc8ef AWNM803i4InInAuRp/JG1OdiEpumEAftLd0EHNz8= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 8545938AA275 for ; Sat, 17 Dec 2022 06:41:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8545938AA275 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BH4Wn7q007203 for ; Sat, 17 Dec 2022 06:41:58 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mh6tqr2b2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Dec 2022 06:41:58 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BH588Lq006853 for ; Sat, 17 Dec 2022 06:41:57 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3mh477nyfy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Dec 2022 06:41:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXWHBZstF+UGmD3Egs0fgD//5p20KWtE347B98Y7r03Oii1Z8hKgjxzc4Fg6VRAYuzacln7KihhyZt0VAVU5fIFsfqbhPznXz7PmdCpMMbdje60NOGL2bThjqWrAN9NxcqcuH4D9A+atlDd1cBoRiXSYwYGClS9X1Z+gGXs7Dv/IxOAThPVOtM0+sBW0ajQAmOgcIQgo8z/cyUp3wsEQqQbq05DyX/5GhZRkji3CNy1SAXLnRyE66raIE7BOPYx2sTEwTs+ltWmzUJ1gSWc0L8aF/I+ruWUdiUFU31opC8Uwxr/i/g2kAdsRNAYrvSYFeC4OQk97hcVNXYx3NEhDjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RkdONes11SPD+OI+59O+XyObIMRr2IPRMBKjRGpxuhI=; b=E51VYG3s/ocCaReDGXcSEkIgeJjeK7Yn6v5K4nvikhSCiTOH2a4sO4diYOZD6s9y2OAF95IH129wbD/2xGMvHQ013h88tJ4yptbECfNKyDiKIjk8VtJI4XGHgj999pRi11yXCC2Umnj5/ll+s25kzEu2xoWoGcjix2hQ2gvEpmy6QTdbVeHxQjz6hB2D2gL1ieLcU/T5y1E+4VEcNp3Td5TTmFNlbuMndYE9BzEy4mp49zO+Th3iWVUBdyzeD7UrykMBN9LayrzCrWA8GaiyPp1lgTi0NRFuOsU8tqib2QLvfbTBX0UdsnhW8NkFOCns1buUFsZhUODTj0iAyeLtBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by BN0PR10MB5285.namprd10.prod.outlook.com (2603:10b6:408:12e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.18; Sat, 17 Dec 2022 06:41:55 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc%5]) with mapi id 15.20.5924.012; Sat, 17 Dec 2022 06:41:54 +0000 To: binutils@sourceware.org Cc: Indu Bhagat Subject: [COMMITTED, V2 3/6] libsframe: provide new access API for mangled RA bit Date: Fri, 16 Dec 2022 22:41:25 -0800 Message-Id: <20221217064128.11326-4-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221217064128.11326-1-indu.bhagat@oracle.com> References: <20221217064128.11326-1-indu.bhagat@oracle.com> X-ClientProxiedBy: MW4PR03CA0291.namprd03.prod.outlook.com (2603:10b6:303:b5::26) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|BN0PR10MB5285:EE_ X-MS-Office365-Filtering-Correlation-Id: b0a88ccd-34ac-4d16-6c9f-08dadff9c977 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7mPasKPODtXvfel8UY8XB9+ucGqrPkGnBVBW2xMpkVKJqtb8jXo+fMDSG+XBnHC/AezZU7r1vILQ9H5X2r9hlEjOtOtkD9irux5aUtr596qgZb5a2gvGbhzZCeFggNQ3P0BUHxacPBq+VxAHJGAoPN1Jg3Wua28AXbEnjppfV1mX9I6BOz3iSazJR/SfWsrkWJOJwtELGsorOyiHfcJSWrIJWF8RTzpsM+JBm8ohvPHa2OAAmwy+AW/d8LMCag4uxsQvd8vEbtXOcZbYCYR31iMS5c2CPkDR9koe+pd1LG3h9KGALNE2XGs7cSKcSh0jA9hfOA7eWC582PTQWo/EMtLXjxEvuCvQ0dqSyW/OEOqZGXjMHWjpdKOH/9PNcdPbisKtJFhwzCFrtmfbHF9cpPpVpwF04sZe+18adA2DdWD/b930pnNJrWu84VW7PZwcnzYIP0G1CLrz1piRt2n5K+Z6hlGuAvtM/OMv4+SnEG2lT8oE9fsFjnyP88jNjOEaoMQJrOzaIHl+Zu3inY9xwaBkczXszrZXQBye0Qm+w95Z0KeEL+5bHatMl0zZNGdU9NdF8ZhdaB96uOZOKc7STnazBCmXmZcXGGQPJRBAluJrj3kx4hTx3J4zV9ZpclKcJld8Xs73BpH+NyNZWuM15w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(136003)(396003)(366004)(346002)(39860400002)(451199015)(83380400001)(2906002)(38100700002)(8936002)(1076003)(186003)(66556008)(2616005)(41300700001)(66946007)(6916009)(36756003)(316002)(66476007)(6512007)(86362001)(8676002)(6486002)(4326008)(5660300002)(6506007)(44832011)(6666004)(107886003)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NPL3AEJ2VHpjswSY4/VeDjUvTl5xUQj0vqDiGYZcL1lFx4ux0oQEY3+ht+PkFyiOixND6t1U71cYbQAKdMiS/hyG/bV153kjJySazhFeZHEUQ1yRjQozghzlc358MgqBA9KoKjCapqbS2tr0v6Jjiyf1Gkq/3n01UDJ4W1K8vkSQO5GMjb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70pYLUwbKdOo9siQDfI+tXuYH9uv3uQ3PUUkYMRsFLw2/xsS8TMSbQmKq/xXLQEQhJOaz070AdttJ6uT5xy+GYiHpAqVfIi8qMs/hwLCIIvxwdclzx+hAa9BWGbL6jh+XmN7VwpgQmk2fKcJnjqFjLInGAXS2zm4Xk2mt4c1NxOR92xbOv0OqOLnymeyD7PjDsGUcmjVG+brZRIhJa68aAdjAQXs3uMa3QfPIw8/DGeiiKDEcyXh9bK/WWo9j8yDpSkTqUVuVUIwiHWMoeznsI1UvG9UDBxHqnQYLCuNtRDJl3/b0oDBUxL4l+r8oOFAwxrlcCSYzQMAAU85DFgBQI4t5aaJJoyIzsCGIJmnJDAtxacRrgBjLbZ48= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0a88ccd-34ac-4d16-6c9f-08dadff9c977 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2022 06:41:54.8587 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cMSioW8xGTUOmMZ9O0bh+1BbZA065PtCcMB5UsvzLNqvv0JaSvpa9p1G2fHNoAK4hy9AqOhzdC+3oGs5PJhJJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5285 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-17_01,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 phishscore=0 mlxlogscore=965 bulkscore=0 malwarescore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212170056 X-Proofpoint-GUID: emfEC3J495WXfEKkLZd_UaQFqHnyDy2m X-Proofpoint-ORIG-GUID: emfEC3J495WXfEKkLZd_UaQFqHnyDy2m X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Indu Bhagat via Binutils From: Indu Bhagat Reply-To: Indu Bhagat Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752442428105539803?= X-GMAIL-MSGID: =?utf-8?q?1752442428105539803?= [No Change in V2] include/ChangeLog: * sframe-api.h (sframe_fre_get_ra_mangled_p): New declaration. ChangeLog: * libsframe/sframe.c (sframe_get_fre_ra_mangled_p): New definition. (sframe_fre_get_ra_mangled_p): New static function. --- include/sframe-api.h | 7 +++++++ libsframe/sframe.c | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/include/sframe-api.h b/include/sframe-api.h index c9db39eaaf0..bd1833558a4 100644 --- a/include/sframe-api.h +++ b/include/sframe-api.h @@ -21,6 +21,7 @@ #define _SFRAME_API_H #include +#include #ifdef __cplusplus extern "C" @@ -184,6 +185,12 @@ extern int32_t sframe_fre_get_ra_offset (sframe_decoder_ctx *dctx, sframe_frame_row_entry *fre, int *errp); +/* Get whether the RA is mangled. */ + +extern bool +sframe_fre_get_ra_mangled_p (sframe_decoder_ctx *dctx, + sframe_frame_row_entry *fre, int *errp); + /* The SFrame Encoder. */ /* Create an encoder context with the given SFrame format version VER, FLAGS diff --git a/libsframe/sframe.c b/libsframe/sframe.c index b17d3234236..b8fde2f04f8 100644 --- a/libsframe/sframe.c +++ b/libsframe/sframe.c @@ -124,6 +124,12 @@ sframe_fre_get_offset_size (unsigned char fre_info) return SFRAME_V1_FRE_OFFSET_SIZE (fre_info); } +static bool +sframe_get_fre_ra_mangled_p (unsigned char fre_info) +{ + return SFRAME_V1_FRE_MANGLED_RA_P (fre_info); +} + /* Access functions for info from function descriptor entry. */ static unsigned int @@ -640,6 +646,18 @@ sframe_fre_get_ra_offset (sframe_decoder_ctx *dctx, return sframe_get_fre_offset (fre, SFRAME_FRE_RA_OFFSET_IDX, errp); } +/* Get whether the RA is mangled. */ + +bool +sframe_fre_get_ra_mangled_p (sframe_decoder_ctx *dctx ATTRIBUTE_UNUSED, + sframe_frame_row_entry *fre, int *errp) +{ + if (fre == NULL || !sframe_fre_sanity_check_p (fre)) + return sframe_set_errno (errp, SFRAME_ERR_FRE_INVAL); + + return sframe_get_fre_ra_mangled_p (fre->fre_info); +} + static int sframe_frame_row_entry_copy (sframe_frame_row_entry *dst, sframe_frame_row_entry *src) {