Message ID | 20231113223739.11844-1-cupertino.miranda@oracle.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1517016vqg; Mon, 13 Nov 2023 14:38:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeEXbb/sWG9KnwskVWeC3ZgLo+ngMAsNxZMLhfChwyhj54w4Cc1a9SzMkwevDo8vYJT0G0 X-Received: by 2002:a05:620a:1791:b0:779:eb01:8390 with SMTP id ay17-20020a05620a179100b00779eb018390mr646218qkb.49.1699915116622; Mon, 13 Nov 2023 14:38:36 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1699915116; cv=pass; d=google.com; s=arc-20160816; b=LcAIunm/cutHXesMN16dpp97OvC+wHXmEiqyfGQnIJEvbxVshVLgc0sJ3AeCWLlQre 74PMBsZF+t+A3bl3E9VW3J+ZrMmgJ1XkxHQ4AJHjJZ2MEIBLpe/zQ2taUwxeQboqdxvS /rd4UYLVQsP8fuzArCEh4Pj+sZurNoaV2ZNPd9vMP0yDqQwS0UWY54FbBexT+H++jy25 oyfwxhR0hIchnVjs9K5/NgG4kx+qhRdiV7ZnzBY1WNQDbbU8EYjyxD7HZZOYR6voK3dV A/H5ykG2565D0kB6hS7GORAgqQy91dLu2+Rcb7NkZz423sWXRScVAxzZskLaXQibirBJ J1WQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Shp5gyd0N1IqG5ul+zH/G+ndrcmAz3W76ZH2aZlzb5M=; fh=GsJfh6MXvL9z/Xak3YpPLLbbsCWOcpZ+AsJKS55GU+4=; b=LwMQBRBYvsjDd0wQTSP9j3TEgsv1pgcyR3g1/RqxEUoFDB6ZX/dk8mPGPKbVbnvZFr EGj0siqyOclVlPBpIBbbvWqUd1gC25UMxnR9iAIoHgP45jzE1AGAvGRlZ4HyRav3T44Y N9h+vqhlL/IhqV6uF1NfviygTWY/c63oo9F2rG1MZ6nrZMBqC4Vc1m+BoNsw9u5AFNdC 11YGWUv20a1B2bnCo4qBK3e4GGrfR2LXzvXwNUxGknrWw16yBorQnWN/q2yUZCMdXmSt z6lUHS+yCe7u9B60RW8hubjneveVKeAKyudDmhwd5u2vB7NWaYPrtQNZz3LvxUSB/iEB T9Rw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=2fqG3nQ9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="G/8N3qOA"; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id o9-20020a05620a22c900b00773d6c99af2si5087333qki.449.2023.11.13.14.38.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 14:38:36 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=2fqG3nQ9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="G/8N3qOA"; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 637623856DF2 for <ouuuleilei@gmail.com>; Mon, 13 Nov 2023 22:38:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id A3BA5383F18E for <gcc-patches@gcc.gnu.org>; Mon, 13 Nov 2023 22:38:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3BA5383F18E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A3BA5383F18E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699915092; cv=pass; b=OUvkb97YjFrrjh57nWEPlf1JF8xC9ppx4BfgFGaUYpiS2fZ0uc6kPRz6js3CJpkUYm6pR/1sXvp+xHlbBki7pEs7cidieCbSuyR2XfueClV3Y+rwxdEFxsELD9vULjdBJB1cFabkSyfAbF3wLTqsoBKhAcc5uXRhpomwOXDqtik= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699915092; c=relaxed/simple; bh=WkXseb82hjgmCs2jyX28HoCXQjHQOfFGeeSf8Ar9oVY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=HX2PJlDEMYlLnYCtFYKc3fqkxCuMdRFU7dDuZKgg15oixqlFRs/RWpFqF0Kc8z0CLkLoB+9QHxjFr02SU9m2/QkpGwdz2uEgMyaz3g5NBgG6SYnkISoQKPZDBdVOyxH//px61sBjlDMDk5rE0TXnnGtyJZQKzij4Wur0rweqpqM= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADMT6kS025020 for <gcc-patches@gcc.gnu.org>; Mon, 13 Nov 2023 22:38:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Shp5gyd0N1IqG5ul+zH/G+ndrcmAz3W76ZH2aZlzb5M=; b=2fqG3nQ9s2P28xNPsC9QdUlO/wNQf0wmyMZU54ATBxUfZO1/LHb6gsgYnalgfSWCHG5c J/LH7+WDQh+ish3ZlGBP9FXjs11MXlLRZpxKIEj25pae3hbOY4Cw7zTA9I4MVOJmooXQ 3NpFAkNe9ywjq3SYxScHf6ooy6h1dtrHzejqi6sghGXyqhLcyTkMNFetJoOTXymOYNGL PDgXXMPPDT36vA//nJE7UreWNwzgCH4Ll8smFT5xybxGKzTGKoDk63/7H536qpsiAJry IcZ5hcgF+SFgWElehBhMH5nwse34ghFTkwqk2kISNipGix4eBGaY2L8bC4S5KZ0EdGjx aA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2n3bwhh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Mon, 13 Nov 2023 22:38:09 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADKpdl3013564 for <gcc-patches@gcc.gnu.org>; Mon, 13 Nov 2023 22:38:08 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uaxj13d81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Mon, 13 Nov 2023 22:38:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FvDcHAM5MxXry3SyEq3814BgYWekMIqvHZc8IGJ0OSRds8LtruOcNW/4Y6a+ZA0uq3rp9rY6+YMstUTLzMY4eEkbf7pKd2qOEMeL7MT5Nqut4TJESCfIlHOAdZVuwecGNyhQtBZgBKiCX19TzFaQYf+7Ga/u+Qn/gJ3mVNb6OHWhCz/Y2SAIfEUQ07vJFn+HECFA1FcTSVQOH+SITyTXPtdySYIaTbyIaXge6r8IDsaiRwDHrdT7whZCuaycpyWgZ3TsStWzP8B0pFiY44EJx0MPhPZ9oo0A6gQ50bVTFlKDRzflmvJOuLAbYrvFoulTUeUXLQ/rSi5+J8nJSG5nfw== 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=Shp5gyd0N1IqG5ul+zH/G+ndrcmAz3W76ZH2aZlzb5M=; b=FJydfhBSAhbSfOuQmKhPn/XxqXGcQsfx6cM5BBXrojZamtPea6MoVLapC/+ONhsvWQNvLTQOFP3l173iUCmGgRKKYPWued9oC/zb5wT2QY3pb2wpchSWug4DKx94zV4USuKngwLNfh6XEr9EnIMaGmmcQzgoMAVsdLF9dMO/ePlclgvqUdsG63KX9O0P5eqY3hhm293+XBBg/86o0LMKg7UNeJ4RteN8gRgLONKneFhtMfQG7zLKF7IS3YUd78IRMMpsKp94NnnC1c7pEa9GjMEw0ayS/br03PWbyOFArie0sjgTOb339r6MLh2XjH4p2WfSD4uhQe8BjpcTeg7jbA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Shp5gyd0N1IqG5ul+zH/G+ndrcmAz3W76ZH2aZlzb5M=; b=G/8N3qOA29HbEFhL2vQcjPSFc1uQSsHHzOqmNO4kC9mls6tJUySA7ZjjqV++9Fbsk3mtZBO2TQ6U/cPV/JAdsKwbhUZ4a18IEme9g6uLCvF9ukQZ+SyHdYDv/51nElTm4aF7f91XiKTuoNZ3BjXKtpZiEPInSNCcBPU1M3GLZk8= Received: from BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) by SJ0PR10MB6397.namprd10.prod.outlook.com (2603:10b6:a03:449::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Mon, 13 Nov 2023 22:37:45 +0000 Received: from BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::fec4:3a58:6118:aab2]) by BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::fec4:3a58:6118:aab2%6]) with mapi id 15.20.6977.029; Mon, 13 Nov 2023 22:37:45 +0000 From: Cupertino Miranda <cupertino.miranda@oracle.com> To: gcc-patches@gcc.gnu.org Cc: jose.marchesi@oracle.com, elena.zannoni@oracle.com, david.faust@oracle.com, Cupertino Miranda <cupertino.miranda@oracle.com> Subject: [PATCH] Fixed problem with BTF defining smaller enums. Date: Mon, 13 Nov 2023 22:37:39 +0000 Message-Id: <20231113223739.11844-1-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P191CA0017.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d9::7) To BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR1001MB2340:EE_|SJ0PR10MB6397:EE_ X-MS-Office365-Filtering-Correlation-Id: df6b2422-55bc-47d4-259f-08dbe49927ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rPTkIRJorGnAXl/R5XvSrz+dA1761KnwVj4dUT0sOZHjh5AI/8w4mS2xFsMgYmacxIoamhz7WYT7GUfj/VBzRr5i/LL1n5RSlt/69KJ7o/5BOrr2duYMoWBumrJdTX1RQ+c6rf7Tr++4GziAClKRQpWzzc2b2fXx71biYTpKNJZhb1GjFTtasIoZehXSnjBOIX8xhUbMNAABMPFISCHqm10E4kP+H2WOyo/qgpj5piH8DW/AbImQRbFgGNZBX8C8aIooqHvtyKchCDZnv5fTa6XgNp6Zxxof3BnOcRksb9af8YGAAImK1BR6vAZn663mENYHpgBVySiJ8TNGDsJSlxpznlu4bT9npduH+IbJHr1rCGSEoypDF3Wzwi8OXeWDAcx3DyQIeiOXRNxoa7vqm3wpsmwcyorhRBF6HzU/UrHVhA8u2WuneCzeKJ7c+vQgr3mJeu2QYuzsyQK0jIlt+xC1cPE9QGVDtG93Xj/g12ue0nQ49NojNx5qh4j5jGjHKGOravc9tWZHGbOfaW2dvrZbcUHUBzY1OcrViYuhrxkrNI1n1KHL826ugMTGaxVBnJYh/TJOESWWyvmNWgMPnwXXI6dHIg77L2AuXtFDIMI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR1001MB2340.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(136003)(376002)(366004)(346002)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(86362001)(6486002)(478600001)(38100700002)(6666004)(5660300002)(2616005)(6512007)(1076003)(44832011)(66476007)(107886003)(6506007)(66556008)(41300700001)(66946007)(2906002)(8936002)(8676002)(4326008)(83380400001)(36756003)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RuHroqA0od1Vw22fayL7u8mclCLRAOERMkG8ajpmQhFGX7vZhUzmHrMrdl8Q43gn1bSWyU528wKBGcPvUkQgYuiS9ksApomIeSv1qkkBhsuWzrsKj6vpzErNHOj5JrUycmDEQfcumf28bj0hBf6c4RUrdAalfaz+te5XsimKJx0tI0+BbmG6haO9ryRPWwHvaP2IM4Om8gWfnCtuNiT0auGTZHSgWdkCACOKRsLpDmBVXGWOiR76WTwM6aGULgeULPfiC9/YOAV31r4WvpBWTLY2tXShBi6IsRzTZhkJyuxOob4j0AhQQRCHGPyyHnA2lnta97SsVOej2ZdzCqUyLztJMhqojh31QYTSHRY2UJ/WIMLGiJlhEq+uU0s8DjEnhiD7BxMQdTcRSk8U2BglquYesq2Afyuj27YAG5eUiOaMp+PoI7L3SLNjB8xcgZEwk6sXbtQNos2QyUHLR/ScfRfSPeIYpuHnIpYMZO7U7OKonO2mT5YupGoRHzIjC3VdDQ6mc19XPbliEVFYnkwGNfHSE9drpW2cnhfj61CkBnGhQvoAm2whb6zWKUHDEvD0PquQmvK7UtenfktLjrC9gbXSvYQCBm0A8uZqud3zSaPhKJCP8TcirJyiHYujhyF/WhlgHWUFmGHdHG+kxsKa89Qp4eUnl/B2Gz8lz4vB04fzkyxWcop9KUO49whxsArkt6OBcDJKlSsSfbMODYPgclxBGHxVSA9hTQc8s+AxVCHpit2LYkBZW+D6y/ZmfVaxLs7SRRHsy0T0O43uD7ko3xk0GF/GWyYAl9/2cFmS7pO3WtsjiU0ciPR8dXCYXggTfl0qUnLIbHIOHEWQuPAKGTbra4dB6sg6OrW6/VNUGz/JTsBzjpDI/uNVTuaOHtaj0G7lSQx8O/3UsEkNyWr4TIqZnoDn26+xI2UKkleB0sC5vI0YzZdvletmtBubAno357Zd8M3dXpA9TmFkB+ZWYTn0p8FMRvKBcyb1UoD1Wivj9vwhPD6d6vSeIPQtqpzSHs7HiAPqu6/vEJ92yTLd/u8HgQXcRX8nBSv2R671WmKSFMxWEe/D9F8ClAST+1iPihiF6HWtYJs22zqxpowmWPszK/2ivmFwrDnF1ShBf7OIoL3HMYc3+5LyJ6QKiZmLHI5EyJ5TpenP+tGR3RmAJodTq0RCL5e2/CSDXJZcDlANlm3gboyLGI4RI+2tFU0x75Js+0ste1W5UmhXeY4B3tNRozc2Ykg5JviMqUOPHSux4DOogcESjdlwYwMyPZzd7Idz/0n/Dxe4UyuM/lLV2Zu7axCEhrOKs+hzEvRO9ePzE5vf4+R/p2xQFpH+odGxfl7jtalhJpEtHideCpchG8DAC85sPac7b3mgryCTXI0BkaEvzQxQEjxLxgT6zw+6Ht4WBO+AAYTcRPq7KlK9Ne4mycaK0GkXIc0cqnZEATMR7hbJgyjSwWUkp/0yFqXghh/F/05E5wWc0gkI0jmZLk1ZkCCv0A/r6uq6YWhWOe+3WAKmrduMukdJuUDtqKK/V0lkRaPv5qxZ53Z0m5ctmUNeGBQj/jjuPbe/+PYJZy+webrIMt9TbRdpEooeg58k42aYogzNcwlbmfpNQwmYo/wF2M0zWxbQItGt7onivs8= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: znycvXUBkBu7Sq2Z7HbvOOwykXMDdrIfhJnxI+3ZvTUy9BZe5P3pQnRJf1n1zon2ire2nfxKmqLgzQFp+Z7AMoWTeCF5FnKIlMOv+AtQpw+dwUpy3hrrdIx0bJiuCdniIO9AHgP269QwQ8AhSRTiLTMlcXt2LdQCSHMNTu8nl7201V6S817MejGpIB+emOrVS5FVnEoADWokNx6N/iS6C5GN5Yzmm02IF6tm1LP1cD8oxSMDt8Cdr2/CgewdmsLpvZog/Xb0gzf8+jWxNQJEP8O5Tc8ksr7102betq87N9spndF5EmRlw3OOMgJtP+4km56qQpjWIcUSb4nRaRoPOSC63I6QaWCUDVkSXXD5wimHXSKkYsoaibB+b7cdBmpLAIX3aNJWPGL7t0QxW1JjtHvngP78Pb7f2q5oPcAIBoqm2WRkHGq7s1gP8TWaP8spTX6L8rFib3wbfp02sbaDy0Ei0DDp5SG/KnkhMIvw6Q7ZL9e8JQvDhvzveTxN4+HJy11YJKrN4iTRV2U4UJmmH0aaBgBNrNIdfV3RMkamwoshKJ0iFCIcpVYNY08QwQxis+Ps89opNfBA2HxOV+1UwF6xaqcoAI+CyHQfFYwiKwOSL13g8+0pRTuWdeVye8L2MafjTmboOx02kcyGjKn7eV7NmF2aV+sJP0FVdd37qCssivspnaFxK/xM/l1A6N/HDz1Ujd9wx2by4K25kgMTH8HPVdtCvCAVbeE99IvzCZ9idwL0H6ZMeFmoSxGLSpd4 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: df6b2422-55bc-47d4-259f-08dbe49927ce X-MS-Exchange-CrossTenant-AuthSource: BN6PR1001MB2340.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2023 22:37:45.3985 (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: rEff2PKpA+5aDqergJYSEMDO4firml3c6cZV+sqNsOzg7ng602mSbmcGuv2AQLNUjVz05H8Ajmg2KSBQcONyKeHWGvF4Xpn2v5MEc0wgT+E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6397 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-13_12,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311130177 X-Proofpoint-GUID: heVLXdAfeUyFqKtCrk5O4i9mt39UYrhK X-Proofpoint-ORIG-GUID: heVLXdAfeUyFqKtCrk5O4i9mt39UYrhK X-Spam-Status: No, score=-12.3 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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782490193703954207 X-GMAIL-MSGID: 1782490193703954207 |
Series |
Fixed problem with BTF defining smaller enums.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Cupertino Miranda
Nov. 13, 2023, 10:37 p.m. UTC
This patch fixes a BTF, which would become invalid when having smaller then 4 byte definitions of enums. For example, when using the __attribute__((mode(byte))) in the enum definition. Two problems were identified: - it would incorrectly create an entry for enum64 when the size of the enum was different then 4. - it would allocate less then 4 bytes for the value entry in BTF, in case the type was smaller. BTF generated was validated against clang. gcc/ChangeLog: * bpfout.cc (btf_calc_num_vbytes): Fixed logic for enum64. (btf_asm_enum_const): Corrected logic for enum64 and smaller than 4 bytes values. --- gcc/btfout.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Comments
Hi Cupertino, A couple of comments inline. On 11/13/23 14:37, Cupertino Miranda wrote: > This patch fixes a BTF, which would become invalid when having > smaller then 4 byte definitions of enums. > For example, when using the __attribute__((mode(byte))) in the enum > definition. Please add a test for this case in the BTF testsuite. > > Two problems were identified: > - it would incorrectly create an entry for enum64 when the size of the > enum was different then 4. > - it would allocate less then 4 bytes for the value entry in BTF, in > case the type was smaller. > > BTF generated was validated against clang. > > gcc/ChangeLog: > * bpfout.cc (btf_calc_num_vbytes): Fixed logic for enum64. > (btf_asm_enum_const): Corrected logic for enum64 and smaller > than 4 bytes values. > --- > gcc/btfout.cc | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/gcc/btfout.cc b/gcc/btfout.cc > index e07fed302c24..d2263ec6eec3 100644 > --- a/gcc/btfout.cc > +++ b/gcc/btfout.cc > @@ -299,7 +299,7 @@ btf_calc_num_vbytes (ctf_dtdef_ref dtd) > break; > > case BTF_KIND_ENUM: > - vlen_bytes += (dtd->dtd_data.ctti_size == 0x8) > + vlen_bytes += (dtd->dtd_data.ctti_size > 4) > ? vlen * sizeof (struct btf_enum64) > : vlen * sizeof (struct btf_enum); > break; > @@ -914,13 +914,13 @@ btf_asm_enum_const (unsigned int size, ctf_dmdef_t * dmd, unsigned int idx) > { > dw2_asm_output_data (4, dmd->dmd_name_offset, "ENUM_CONST '%s' idx=%u", > dmd->dmd_name, idx); > - if (size == 4) > - dw2_asm_output_data (size, dmd->dmd_value, "bte_value"); > - else > + if (size > 4) > { > - dw2_asm_output_data (4, dmd->dmd_value & 0xffffffff, "bte_value_lo32"); > + dw2_asm_output_data (4, dmd->dmd_value & 0xfffffffe, "bte_value_lo32"); I don't understand the mask change here. Why clear the low bit of the enum value? > dw2_asm_output_data (4, (dmd->dmd_value >> 32) & 0xffffffff, "bte_value_hi32"); > } > + else > + dw2_asm_output_data (size < 4 ? 4 : size, dmd->dmd_value, "bte_value"); In the else case isn't size guaranteed <= 4? In which case, 'size < 4 ? 4 : size' always evaluates to 4. So I would suggest to just write a literal 4 to keep it simple. > } > > /* Asm'out a function parameter description following a BTF_KIND_FUNC_PROTO. */
diff --git a/gcc/btfout.cc b/gcc/btfout.cc index e07fed302c24..d2263ec6eec3 100644 --- a/gcc/btfout.cc +++ b/gcc/btfout.cc @@ -299,7 +299,7 @@ btf_calc_num_vbytes (ctf_dtdef_ref dtd) break; case BTF_KIND_ENUM: - vlen_bytes += (dtd->dtd_data.ctti_size == 0x8) + vlen_bytes += (dtd->dtd_data.ctti_size > 4) ? vlen * sizeof (struct btf_enum64) : vlen * sizeof (struct btf_enum); break; @@ -914,13 +914,13 @@ btf_asm_enum_const (unsigned int size, ctf_dmdef_t * dmd, unsigned int idx) { dw2_asm_output_data (4, dmd->dmd_name_offset, "ENUM_CONST '%s' idx=%u", dmd->dmd_name, idx); - if (size == 4) - dw2_asm_output_data (size, dmd->dmd_value, "bte_value"); - else + if (size > 4) { - dw2_asm_output_data (4, dmd->dmd_value & 0xffffffff, "bte_value_lo32"); + dw2_asm_output_data (4, dmd->dmd_value & 0xfffffffe, "bte_value_lo32"); dw2_asm_output_data (4, (dmd->dmd_value >> 32) & 0xffffffff, "bte_value_hi32"); } + else + dw2_asm_output_data (size < 4 ? 4 : size, dmd->dmd_value, "bte_value"); } /* Asm'out a function parameter description following a BTF_KIND_FUNC_PROTO. */