Message ID | 20221207195222.1182788-3-indu.bhagat@oracle.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp376067wrr; Wed, 7 Dec 2022 11:52:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jrGX03qiPY1wuHsn84Yva9Mh4x4QRZPd+5zULg9PfSfE39ZB2EeXI6E4y0RvqNFECxg9L X-Received: by 2002:a05:6402:22ee:b0:46c:d916:66bb with SMTP id dn14-20020a05640222ee00b0046cd91666bbmr10913401edb.34.1670442775698; Wed, 07 Dec 2022 11:52:55 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qk32-20020a1709077fa000b007877b1c7f27si17537619ejc.829.2022.12.07.11.52.55 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 11:52:55 -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=Mwvgb8jJ; 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 603D839217B3 for <ouuuleilei@gmail.com>; Wed, 7 Dec 2022 19:52:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 603D839217B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670442768; bh=8Uti5E/bgmmnwV1U6eTSOCoD0qer31ot4ejRueFCgbo=; 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=Mwvgb8jJL3kTL6lexxqLW949HZ/dXMwSDI3qepMYf9553rnAa39FfZvrlNO8SEpd1 PVjbw3J54XfYGzk3y+qQ3v024T/E6qkplouQkCL5yCb43GRSA5xZwwDFjNy1g7vGfs iq+A0o8voJPkah0bSc+jtP/naRnGe1j5Yx8sPoz0= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 452473833A06 for <binutils@sourceware.org>; Wed, 7 Dec 2022 19:52:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 452473833A06 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B7GDuxJ010247 for <binutils@sourceware.org>; Wed, 7 Dec 2022 19:52:35 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3maudus7mx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 07 Dec 2022 19:52:35 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2B7Iw3Mx016117 for <binutils@sourceware.org>; Wed, 7 Dec 2022 19:52:35 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3maa4qmc2d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 07 Dec 2022 19:52:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WfkDbyYx0101hOL7Edst1vaPhVjzbkQzNRqq3werhZ5X1Aori8UKRl7sp+D97Zl2tLDUgb9LblfBshMG2gM1RWZIk6+XE8WCaPiq7yVmWH+xbL76eayatQDWeJyuANz+3cuPkDwjwl1ypLSqPUQoGQ6nyOBs40wCSibRTZUubVhSWgnB17Sjh7xot5Xgh/ktwj2YgmUkgrFT8nPqy1rZeYmsKlW7oAs6bftH3hGb/7cYk5s8ZKl0RuEtvrZ8GunygywjtkcaRn8uNDe1+DBWMOzeXrZlDas+0lhKe9kXTF0ZM8CMVutc3ZTGm0a4FpiAC8HscF5GO8Yb3pM47LpBBQ== 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=8Uti5E/bgmmnwV1U6eTSOCoD0qer31ot4ejRueFCgbo=; b=aSpZl2vu98mYffSvRumpLQ2E+4pnS9IpC+cRgeVNYMEWn00cbf7w5Va86uFBgpgWH6bJANOgjiUhfHdlGCGDbD5JNHH8LF0SqAUSrUJSALelyBeZ50G/a2xndxXM8shLCDrcDecqvBQJlNl+R2enKBqudqgjFkVahoONgwdpTPFSBgeTj6FRgF+svfgx2FfUjYT5qjPsqBohYNuGAn9Jivwmp5kIr3S66Xi3qLHqoUq0g6TN93Cx+DfGNIaNbBHi2UckHGoWSY6wS48r0m6oWzaxPhXa4dqN7feJKvrGdQheyxx+oqHz4bc0UygRtzwWTNg5xK18QA5oCzqr+6Nx0A== 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 BN0PR10MB5125.namprd10.prod.outlook.com (2603:10b6:408:12e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 19:52:33 +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.5880.014; Wed, 7 Dec 2022 19:52:33 +0000 To: binutils@sourceware.org Cc: weimin.pan@oracle.com, Indu Bhagat <indu.bhagat@oracle.com> Subject: [PATCH 2/6] sframe.h: make some macros more precise Date: Wed, 7 Dec 2022 11:52:18 -0800 Message-Id: <20221207195222.1182788-3-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221207195222.1182788-1-indu.bhagat@oracle.com> References: <20221207195222.1182788-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0324.namprd04.prod.outlook.com (2603:10b6:303:82::29) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|BN0PR10MB5125:EE_ X-MS-Office365-Filtering-Correlation-Id: cac56ee0-5b14-4111-ba24-08dad88c94cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HeU7TGqmg3jgFnN8so0aksxuAvyiQ2UihlvWNgOuf+ONgNDEBWNr2o4EEECwlpDWoc9vJvlbngPyXad5zSQ7J+mGe9c/bCTIhvDdFtvrS94I03FwHFmJtLpxpHdfJVAyQuZzpjT1mTPRBOX3YunAKigBUG79Glah+M26zQWQGQ3LsNIvjE1c6X4ioZB9hqT4RSTqLiCgymY/rCSsEznWYVpXekG6kWucJKYtkc1/DlC5i4CBpAh1FL4/24ncSX66h168WsKDHVap2SnaVTASUR3LExmsv+/kAm6uD4aGYbr9RNdyvkzfAVIL0UDUBOGzBADG/AUMoDKHxPWXmkqHC82998v0W3sJx0mog5flv0TKojCcEP/i55QhuAoTld6IPcqww5DuilQdZiRG9Ll5XHBd0Kj1FjGAycd+ig27QJPpp0rJyGoGPG+Jd8Uv+GKz4qkWs31vZxWIRO/r1gGHDZa32WRCoRS4iEJPWPGD8lJ2PV/1L/NJ+ygz20rwBXFoql4028SSnbjnofeDjO/2PQ3h54GMY247WnNlbanA/+uueZYgfg0vfiQhc/W7y7o/hodIqZ/clPGQEAxS8fIma1Qc6JUbChD4XaDE0Ii0lPR5ejrpN2Fv+Ll7u+N1lPX+lEozKUmId31pr+PbGMCJhg== 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)(396003)(136003)(366004)(39860400002)(346002)(451199015)(83380400001)(38100700002)(8936002)(4326008)(66946007)(66476007)(6916009)(86362001)(41300700001)(44832011)(2906002)(66556008)(8676002)(478600001)(6666004)(5660300002)(6506007)(186003)(6512007)(107886003)(316002)(2616005)(6486002)(1076003)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: geZCo3Xh82qXs52ELWwAhlbn9P2XArDcmYgATyU+aTZGhbpH1luOJONKXseAMZdDZTIgKKLd3f4wmleJxXyAp4cAqdAzqr0zTJpcEqmPdlaK7Mr0sJpQRvRLXAEdXcsB3Q4VS+JSPTtrTks1bdZHP1BzYDIGoN1N8dM6tyJpJUfWczvoL/+uuPVx9rglsBSmiD7qFPn3fZZT41yVQk/bcQjM65Fj7IHO1CWlCS0yPSFJndi3cIgZ+kWC00oi1kzNELHZGNAvUZJUprXmHq6+LLHbozFHh0I65lumr9W7XgHhk9aMrnwqx8rbua4s0VDnL4vo8HZUY/r3wYIa5Aj/JaNTzssJ7rczfoJtpLejBYJGGQL69IM4VlShWp8O5d0+QgBJ7nyGXeYWAUvXTz1a1tFnXNSp0U5MQCKwbMUUo82thIKpdmABjzoEa1fTnqUFyvGwzqa8yIBISPctQ5wqTRFcuwN9Aw+xq2ltSui3Pttc8LfjT2CCKggvZwxpiJNPf06INfV+ZzLfw9GcpXuc103Ca+PTSsDZDTgliyNdyPb8+85X3eQFmbNcPEEGf5icOrp+ifsPcFG2bQvy0TKCKGw3Sj03LYw2j/OF+hMw9sLCpCo2SWkXBs710LweI25Oj9S1DU4UxlBBT8ocftekY8qhMbCgxo6tz7v8qhW2NlhzB/OrSc1C55Y9nDjXZsP1BUvGiz6+r4rjvSoDt/0BYvUc1/4zjYqSk5Vb7m2L516GEGRIkpD26h4SAERl14CDaXC3WZaU4LCa4+9HtrS+Ela2O/kgTVJOsD6cGfJclkhthgY9h1iwLpf9ovsk0v0kpfTMNSPMmXYrRpK6ztjCcKy05GCGAWEOJHj/1NvCSd3vGUX7Z0Emu9MtGZ5Oi9Wt1tD9dtc/mN4PyAhplnB521K5cGvpbKBCHqsWs+Va7mWCpli9ZcCsIRoXEUQdGN5GEeRN4Hp5R3dFUb+l/rXglkXTs3WwGHHWGxIty7+EsujHDUtCzXVPOEuPYK5Usr084tHSruuBPg1nxZtb8jdA2PsZhdKEDOVRRy9fEIhRrt5OPpAtMSGQ+f4qsPohuokjoWId7V5YpJlYfyxfsxZ+GoJtGiDHhce+6DgpKYeJmQH9NIxhS1lor+KHH4/gPXTk25XHR064/S9vgEb2evUpfOhtUEi9uACb59e3cTOu9wjf5vC+8PtwwZCWQCWHLqE7QesaiEzyqAnvz5SPWEwDsFO3IBNv9Aa+OOEl00l7roq1skmvc5KwulONSjHciQn0Zc4lyfvgM0BYFR3u8O3amnBVEG56tB2wQCGB1kPV95l+UJGX0NCTW4rRHcRoZBlWteAoTVAxHYxSxJ+owyrUDFgZYfGUzCFbiUstGIVSS/SQv+S193m1aOSMaO0EzXbjHPNihJ0bwiUG8iHSAW+hrf4JfBMgK9n1XnrK5IdCIPqOaV9f5655voy874V7OLvvYAdfdHzg36bd+4aM6KOIVwaZFZ4uQSB1eDlrclhhlHA4WJDn1FP/A+FhA02MDFtvmmZRPiE2L0AGcYZvf+7RZXSrBoC/GUcZGm2c7SNThAvMY+zofSp0mU1pIPQZ54381gXtLqbC0CBQM6AQCgpZQ+VtMsftNwJnXhn+/4r83ms= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cac56ee0-5b14-4111-ba24-08dad88c94cd X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2022 19:52:33.0815 (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: lXThj/zsTBWH7ra6LGmiOXQw2vL2Scw+Q2BsSslguiE6Ew/pKMKxsPrmKiptsFwV6u8rZwnXel0JKo07nnwUrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5125 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-07_09,2022-12-07_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=817 suspectscore=0 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212070167 X-Proofpoint-ORIG-GUID: 72o6niMaq7LpW884AJ2WACVcT4vMvo1i X-Proofpoint-GUID: 72o6niMaq7LpW884AJ2WACVcT4vMvo1i X-Spam-Status: No, score=-3.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, UNWANTED_LANGUAGE_BODY 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Indu Bhagat via Binutils <binutils@sourceware.org> Reply-To: Indu Bhagat <indu.bhagat@oracle.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751586204027909830?= X-GMAIL-MSGID: =?utf-8?q?1751586204027909830?= |
Series |
Small improvements around SFrame support
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Indu Bhagat
Dec. 7, 2022, 7:52 p.m. UTC
include/ChangeLog: * sframe.h (SFRAME_V1_FUNC_INFO): Use specific bits only. (SFRAME_V1_FRE_INFO): Likewise. --- include/sframe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, 7 Dec 2022, Indu Bhagat via Binutils wrote: > include/ChangeLog: > > * sframe.h (SFRAME_V1_FUNC_INFO): Use specific bits only. > (SFRAME_V1_FRE_INFO): Likewise. > --- > include/sframe.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/sframe.h b/include/sframe.h > index 7e31284e4d8..ba557b7bf7a 100644 > --- a/include/sframe.h > +++ b/include/sframe.h > @@ -192,7 +192,7 @@ typedef struct sframe_func_desc_entry > /* Macros to compose and decompose function info in FDE. */ > > #define SFRAME_V1_FUNC_INFO(fde_type, fre_enc_type) \ > - (((fde_type) & 0x1) << 4 | (fre_enc_type)) > + (((fde_type) & 0x1) << 4 | (fre_enc_type & 0xf)) Random comment: you removed the full parenthesisation (sp?) of macro arguments here; compare to handling fde_type. ITYM: + (((fde_type) & 0x1) << 4 | ((fre_enc_type) & 0xf)) Looks like the SFframe code "has improvement potential" in this regard, because right in the context of your patch, there's: > #define SFRAME_V1_FUNC_FRE_TYPE(data) ((data) & 0xf) > #define SFRAME_V1_FUNC_FDE_TYPE(data) ((data >> 4) & 0x1) (Pre-existing badness for SFRAME_V1_FUNC_FDE_TYPE compared to the goodness for SFRAME_V1_FUNC_FRE_TYPE.) > @@ -240,7 +240,7 @@ typedef struct sframe_fre_info > /* Macros to compose and decompose FRE info. */ > > #define SFRAME_V1_FRE_INFO(base_reg_id, offset_num, offset_size) \ > - ((offset_size << 5) | (offset_num << 1) | (base_reg_id)) > + (((offset_size & 0x3) << 5) | ((offset_num & 0xf) << 1) | (base_reg_id & 0x1)) Also, here too, you just added one more. But better improve it than making it ever so slightly worse. brgds, H-P
On 12/7/22 15:52, Hans-Peter Nilsson wrote: > On Wed, 7 Dec 2022, Indu Bhagat via Binutils wrote: >> include/ChangeLog: >> >> * sframe.h (SFRAME_V1_FUNC_INFO): Use specific bits only. >> (SFRAME_V1_FRE_INFO): Likewise. >> --- >> include/sframe.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/sframe.h b/include/sframe.h >> index 7e31284e4d8..ba557b7bf7a 100644 >> --- a/include/sframe.h >> +++ b/include/sframe.h >> @@ -192,7 +192,7 @@ typedef struct sframe_func_desc_entry >> /* Macros to compose and decompose function info in FDE. */ >> >> #define SFRAME_V1_FUNC_INFO(fde_type, fre_enc_type) \ >> - (((fde_type) & 0x1) << 4 | (fre_enc_type)) >> + (((fde_type) & 0x1) << 4 | (fre_enc_type & 0xf)) > > Random comment: you removed the full parenthesisation (sp?) of > macro arguments here; compare to handling fde_type. ITYM: > + (((fde_type) & 0x1) << 4 | ((fre_enc_type) & 0xf)) > > Looks like the SFframe code "has improvement potential" in this > regard, because right in the context of your patch, there's: > >> #define SFRAME_V1_FUNC_FRE_TYPE(data) ((data) & 0xf) >> #define SFRAME_V1_FUNC_FDE_TYPE(data) ((data >> 4) & 0x1) > > (Pre-existing badness for SFRAME_V1_FUNC_FDE_TYPE compared to > the goodness for SFRAME_V1_FUNC_FRE_TYPE.) > >> @@ -240,7 +240,7 @@ typedef struct sframe_fre_info >> /* Macros to compose and decompose FRE info. */ >> >> #define SFRAME_V1_FRE_INFO(base_reg_id, offset_num, offset_size) \ >> - ((offset_size << 5) | (offset_num << 1) | (base_reg_id)) >> + (((offset_size & 0x3) << 5) | ((offset_num & 0xf) << 1) | (base_reg_id & 0x1)) > > Also, here too, you just added one more. But better improve it > than making it ever so slightly worse. > I agree. I will fix these instances. Thanks for reviewing, Indu
diff --git a/include/sframe.h b/include/sframe.h index 7e31284e4d8..ba557b7bf7a 100644 --- a/include/sframe.h +++ b/include/sframe.h @@ -192,7 +192,7 @@ typedef struct sframe_func_desc_entry /* Macros to compose and decompose function info in FDE. */ #define SFRAME_V1_FUNC_INFO(fde_type, fre_enc_type) \ - (((fde_type) & 0x1) << 4 | (fre_enc_type)) + (((fde_type) & 0x1) << 4 | (fre_enc_type & 0xf)) #define SFRAME_V1_FUNC_FRE_TYPE(data) ((data) & 0xf) #define SFRAME_V1_FUNC_FDE_TYPE(data) ((data >> 4) & 0x1) @@ -240,7 +240,7 @@ typedef struct sframe_fre_info /* Macros to compose and decompose FRE info. */ #define SFRAME_V1_FRE_INFO(base_reg_id, offset_num, offset_size) \ - ((offset_size << 5) | (offset_num << 1) | (base_reg_id)) + (((offset_size & 0x3) << 5) | ((offset_num & 0xf) << 1) | (base_reg_id & 0x1)) #define SFRAME_V1_FRE_CFA_BASE_REG_ID(data) ((data) & 0x1) #define SFRAME_V1_FRE_OFFSET_COUNT(data) (((data) >> 1) & 0xf)