From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 5AA46385040B for ; Fri, 17 Feb 2023 14:33:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AA46385040B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31H7htbu001495; Fri, 17 Feb 2023 14:33:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=references : from : to : cc : subject : in-reply-to : date : message-id : content-type : mime-version; s=corp-2022-7-12; bh=HaF+o3DLFdlj2ltA4KgpK9gnPhSgoU4JVNI5xB5mbkY=; b=dkttyISz9HNx3uHXE1IAKqSJJdDOnx2IxeE2ydr3UVNPrE50yZsXyPVRspBRPQa5dcK2 3pp71YbQmxDYsZAR+fUjFCJXWhyPmPrRY5IJf31+NddRjwsQZ3JSqvuTYbMucXIX+v0c Dl3nhXispwjURSnyRwctPEIh2vcbboxmQ7v7tvPa4sD3GDmvnERhRCWJJq9b16qpPqbz c3VEmKIRhb+NoOc0zVc/XaBQl/hymg+raQ9ESZDYOn5U/jHYD0olGLV8zC1TWB4lev3y hE/xBkQWFOCw7lkLDb70zbkUIn7uw9msK4Vo+rBegp/UOaPnPj/aOYF7p363t9oJXWb/ 7g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3np1ednwh5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Feb 2023 14:33:54 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31HCkUUS012133; Fri, 17 Feb 2023 14:33:53 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3np1fa5s1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Feb 2023 14:33:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxuHWkwE51S8zVMC8KZdI8RVlEiheOQPaN1d99MKCjKaQB8oTUpq1PYqkO4p1jxiYlad5YyOOHIIY6raowR1iNzyLYKhAtHGG+NEkWTTDMooZNCgxvyF/A2JfkQBRnU8heBrE/5SusPNhOHXwxKMH/HbDfNPDMSH+8bqAKG+eqsqivNMq9gOVwCmwGfiYbtIZY1ucihhNTfY9p2pYJFXMNLvkWOVyJIbbyRM3c2GlnffDMkwS2aYYnXfZwH04C2UjQLdyVHZjyc0C3ww7sptxEvG7MgOf03oI3FWhV2qrtOypAHX8o3WCsSWoTdOUrQuEHrBDOtPK/6A/8IXsDtbSw== 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=HaF+o3DLFdlj2ltA4KgpK9gnPhSgoU4JVNI5xB5mbkY=; b=TO1sdW6/Im51LaC00Qjhfkcrqi0er3XqEc+kmTw16EMIlzjqyO3BT1CcMLFcZGUEOGpK5DizdSYDFOWziTJMsRuPQSoEl/A1OWjbfvFJlrWutk4BQap0r4Dtbgzapa7kHFDGSNOChiHX7m98Nqx1bzZOfzOukFPT88aIJdQxMOR2tNagvNO7MHaLKKEWPZbpRRmz5o7aPseeEw9rNbX1xkXT6G924MTinFemEuKHPxHvHi7BKP/XpbROLnPTTmjNkJE915Ndw23qK76NhT6iThXAIgFWBGQkN64RZDB6UJUcQoktQ+g2bzACKo8bEMub8VWVfgwHSycCl7UFdh01dg== 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=HaF+o3DLFdlj2ltA4KgpK9gnPhSgoU4JVNI5xB5mbkY=; b=ZofprUAaME3DFE70NICLdvqdk8cs28WjH/8SYMQPuasdSLl7J3ir28Bun70NOFk5THL48nuDni/15Z/JRPwkeKeZa5IufUwv7EC1wKNZoU+dphoHhh6HSqO6TeKlabhxhnqoPnCfV5mIkQu2moBT7/JpYXjw4gMkSC1JLaBIN9Q= Received: from BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) by BLAPR10MB5361.namprd10.prod.outlook.com (2603:10b6:208:325::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.12; Fri, 17 Feb 2023 14:33:51 +0000 Received: from BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::2b7a:b98b:e12:b750]) by BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::2b7a:b98b:e12:b750%7]) with mapi id 15.20.6111.010; Fri, 17 Feb 2023 14:33:51 +0000 References: <20221202175225.2780-1-cupertino.miranda@oracle.com> <20221202175225.2780-3-cupertino.miranda@oracle.com> <795fde7f-5bde-d1a5-e790-b15774effd1c@gmail.com> <875yen5ib4.fsf@oracle.com> <87h6wg15np.fsf@oracle.com> <87v8knax2p.fsf@oracle.com> <87wn4tajir.fsf@oracle.com> User-agent: mu4e 1.4.15; emacs 28.1 From: Cupertino Miranda To: Cupertino Miranda Cc: Jeff Law , Cupertino Miranda , jose.marchesi@oracle.com, gcc-patches@gcc.gnu.org Subject: Re: [PING] Re: [PATCH 2/2] Corrected pr25521.c target matching. In-reply-to: <87wn4tajir.fsf@oracle.com> Date: Fri, 17 Feb 2023 14:33:39 +0000 Message-ID: <87o7psbbuk.fsf@oracle.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0164.apcprd04.prod.outlook.com (2603:1096:4::26) To BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR1001MB2340:EE_|BLAPR10MB5361:EE_ X-MS-Office365-Filtering-Correlation-Id: 168507c1-7865-496b-3b51-08db10f3fc57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ez9+ZkCoxOGO4zVQKO/Ls4AkkfUe0RYjznlMGqgN/w12oMf4MH1xI1i9P/mgI3UcomQPhq0411bnLg4lJluhJ6MJlhaYqppvwfuWu7kxM/VnjnFk7CUoqWL+SnKnUNJkq1kceSxbE6MfcAJhBmy7c4jHsDez3NgEDHz7miGjWo70WsKXotXi4hAP1arp6RNfzyaCMZ+7vNv9ezNSO9Jfp2dYqVou5v6lKbEC91HVpirzupbIQIhfy/imsr9EKSzQhy+V7hO7zvubk8GoHN3SSTI7NJFFklJFsymaFPxUR3SOPhc1JxypBV/GIJke3RFr2xLivRHlUrrJ4EbzKWDE7lMWhp4NhjQtUXk5lOxySEs4QCqLQQ+hYoAts5qaseu3qGwI2b6nH+C2kFWRxKC9wQTSJ2Uh74yHb8vzflWAyR/AmRX9wBVEamMR29JxBdiH5e2Ocp9WDSyH9fD+d9urafCjEElmq9PrUagAmoT/XNuU5xymzNCa1CdI8qMvm4zUrJskgxAWYgDrILZKawub7zmhl2420ALV6ikXx7N6Ea4gzhNDdJw5jvd/5pj29SE9OQFzw71vkiJmM7Xa/sPkoK3D0MAiLqpaz0057kzrbsf0Oc3LA35dMVb4alu/kmAWCPuU/qYP8X8V7hN7pxTb6Q== 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:(13230025)(39860400002)(366004)(346002)(376002)(136003)(396003)(451199018)(44832011)(6200100001)(2616005)(83380400001)(2906002)(53546011)(6486002)(6512007)(41300700001)(6506007)(6666004)(478600001)(186003)(86362001)(316002)(66556008)(36756003)(54906003)(38100700002)(6862004)(5660300002)(8936002)(4326008)(66476007)(66946007)(37006003)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9JJeouAkMMnmX4FVtmTye1On5xU1a3J7tSUigQzUjjndUHhkBEPzwXgPR5aG?= =?us-ascii?Q?7+7Jx48RAYP0edcavjFvgDOyJu/523PiW0Hlys8safJ1btjLFK2Sxjqfx5CM?= =?us-ascii?Q?ogIdwnSU1k0wVriZrZHD8G2lUXaBij685Z9wbrkxrZKl8cZfvdTUytERdqWU?= =?us-ascii?Q?VSMX0+uoSlAAjH4+E8A4OenX6KAMRHT67+JhTCrCqq/jY++BNfJuUDY4qpWu?= =?us-ascii?Q?+QehMHAbS5KarI+y3Jxvi7yzZ+cVdqrn0HlXxMmDn/UCo4GpvVioNlt3FVah?= =?us-ascii?Q?/VAi4H5vJMT93kRF9HGgzJPI9p5OHcYLkc232QVSCSBG5JyvGkz08+uZxBdY?= =?us-ascii?Q?jii4Oy0W4KaYuFBD08nIgMWA4V2dc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ascii?Q?6tSDeu1iQ/BySwN6sQn1uPd49uEBQJ/ZBMBBu+71SbKL1d1GJ51UGz5E3PNL?= =?us-ascii?Q?7VzusCsTnnjeFzn77gBJuC2Cc/WYZ1YQedO7RRbMe8luNsWR1bYW9syrzMg+?= =?us-ascii?Q?YDSy1ooynn+XJWhHbbEIWsjtusz82o8Zfm7jB0C5d6phIuCL02PYDVMefzgb?= =?us-ascii?Q?LsXbJRRGRezSx7u4+7kEuGr9onA2QM/3Bze3Xc9mmJu0CRhg8KG2ZRt1X/eQ?= =?us-ascii?Q?CaU76KlMZsRVlRqa0tV6k1RFVhWvTD4Ex4/m/zC21k82mlxEfEXfrukET7BG?= =?us-ascii?Q?0JWo0rfLspYDtsoS95tmgdcEyqkTjfXj1aZKL+tCYqkkL1D+msErFhG7QXxL?= =?us-ascii?Q?0S3+yCjn8Cwx1XM2Z30turskIyi65qXc2W0v/bZhaP2S?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 5CVhFEAM4lHibRdHymoL/VYmMoOSS//Sa5tql7v13aCCPOSoqcXS3Q/difXFv5yQ9ulEudowddL3aadEbdxPfkaatmq5rO3jfQq04r8rw7Qrola+zGvLDF4VC2pq+3bV4MjpO6GRqG07K0outDqlyVSpYNWW7L3UC6pBg7QQ24RRETSrsbC89an3IkRbwyBnsdEjpqZ9EvJP/IUl7DWZFtob2me08a0sWU72LPBAuf9N59e1uKt914J8yl4kvdZmieoHJS55Cr/BbAIDHsjZ+BnZV4xUYekItRPJQT4q4Locj5+BsvpMVjAulRYams4gOtzoC2tpoKYnWoE2x3YGVnSGqKHNrWFOLENTi/5c8BSoNQHGeL24SjUemKEDv7eQBcgd+0Vl+t2+GQlaxXbtV+KfMAInQ4IW82XhpEcMmgO9za+3xPfITj6dNMDg3omzjQmCnik9K3pU1TaS4r0xKJPd6gRY10ffDfJzQr/ilZUWk8knNwfsI8d+vSz2qML6xFaUIhzCHUkwxCign+38+K9J51wRfj4PTh7NRgqHYmkFR6q4U0QCFVVilhfjLb8O9eWXiSUNfpC234/OT7uV7ou7mb3JzhxwquiYMxSQv2DcnMibrt8pN0fMW16yNv3BEAu4aVpvhVXzzI/yN1v/DOZsRA8xpzBr8zI8NDgu3OfImqGe+Uhxr199lxFdiqFwCVvVtJu8XN6Z9ZcL2nTPPMEOHCLnU7Ewg3FfEI5vx/8lVtN25KRe7hntzy87jrWc5xkgSebFrD3W/xNyW77ldg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 168507c1-7865-496b-3b51-08db10f3fc57 X-MS-Exchange-CrossTenant-AuthSource: BN6PR1001MB2340.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 14:33:51.5197 (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: baA9z8Csb9lxtfxhWqC2Qip3j6vaeC6rKWU/d8w2xQhndHv1FTXB+bnL3d6xXKk7BpfC9PkImiOwFJxc0UCUzxsv2kFXMyAte+hwKCsZoKo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5361 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-17_09,2023-02-17_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302170132 X-Proofpoint-GUID: emNkLFX-UELg4AfQcl4yF7xzyHRHGUMR X-Proofpoint-ORIG-GUID: emNkLFX-UELg4AfQcl4yF7xzyHRHGUMR 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_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 List-Id: PING !!!!! Cupertino Miranda via Gcc-patches writes: > Hi Jeff, > > Can you please confirm if the patch is Ok? > > Thanks, > Cupertino > >> Cupertino Miranda via Gcc-patches writes: >> >>> Thank you for the comments and suggestions. >>> I have changed the patch. >>> >>> Unfortunately in case of rx target I could not make >>> scan-assembler-symbol-section to match. I believe it is because the >>> .section and .global entries order is reversed in this target. >>> >>> Patch in inlined below. looking forward to your comments. >>> >>> Cupertino >>> >>> diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c >>> index 63363a03b9f..82b4cd88ec0 100644 >>> --- a/gcc/testsuite/gcc.dg/pr25521.c >>> +++ b/gcc/testsuite/gcc.dg/pr25521.c >>> @@ -2,9 +2,10 @@ >>> sections. >>> >>> { dg-require-effective-target elf } >>> - { dg-do compile } */ >>> + { dg-do compile } >>> + { dg-skip-if "" { ! const_volatile_readonly_section } } */ >>> >>> const volatile int foo = 30; >>> >>> - >>> -/* { dg-final { scan-assembler "\\.s\?rodata" } } */ >>> +/* { dg-final { scan-assembler {.section C,} { target { rx-*-* } } } } */ >>> +/* { dg-final { scan-assembler-symbol-section {^_?foo$} {^\.(const|s?rodata)} { target { ! "rx-*-*" } } } } */ >>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp >>> index c0694af2338..91aafd89909 100644 >>> --- a/gcc/testsuite/lib/target-supports.exp >>> +++ b/gcc/testsuite/lib/target-supports.exp >>> @@ -12295,3 +12295,13 @@ proc check_is_prog_name_available { prog } { >>> >>> return 1 >>> } >>> + >>> +# returns 1 if target does selects a readonly section for const volatile variables. >>> +proc check_effective_target_const_volatile_readonly_section { } { >>> + >>> + if { [istarget powerpc-*-*] >>> + || [check-flags { "" { powerpc64-*-* } { -m32 } }] } { >>> + return 0 >>> + } >>> + return 1 >>> +} >>> >>> >>> Jeff Law writes: >>> >>>> On 12/7/22 08:45, Cupertino Miranda wrote: >>>>> >>>>>> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: >>>>>>> This commit is a follow up of bugzilla #107181. >>>>>>> The commit /a0aafbc/ changed the default implementation of the >>>>>>> SELECT_SECTION hook in order to match clang/llvm behaviour w.r.t the >>>>>>> placement of `const volatile' objects. >>>>>>> However, the following targets use target-specific selection functions >>>>>>> and they choke on the testcase pr25521.c: >>>>>>> *rx - target sets its const variables as '.section C,"a",@progbits'. >>>>>> That's presumably a constant section. We should instead twiddle the test to >>>>>> recognize that section. >>>>> Although @progbits is indeed a constant section, I believe it is >>>>> more interesting to detect if the `rx' starts selecting more >>>>> standard sections instead of the current @progbits. >>>>> That was the reason why I opted to XFAIL instead of PASSing it. >>>>> Can I keep it as such ? >>>> I'm not aware of any ongoing development for that port, so I would not let >>>> concerns about the rx port changing behavior dominate how we approach this >>>> problem. >>>> >>>> The rx port is using a different name for the section. That's valid thing to >>>> do and to the extent we can, we should support that in the test rather than >>>> (incorrectly IMHO) xfailing the test just becuase the name isn't what we >>>> expected. >>>> >>>> To avoid over-eagerly matching, I would probably search for "C," I wouldn't do >>>> that for the const or rodata sections as they often have a suffix like 1, 2, 4, >>>> 8 for different sized rodata sections. >>>> >>>> PPC32 is explicitly doing something different and placing those objects into an >>>> RW section. So for PPC32 it makes more sense to skip the test rather than xfail >>>> it. >>>> >>>> Jeff