From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 283983856DE0 for ; Wed, 12 Oct 2022 08:26:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 283983856DE0 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 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29C7ftj6021275; Wed, 12 Oct 2022 08:26:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=z9XxL+5mFdFwprinTybF4GwjolKAf+9bUQUscvvLdiI=; b=Q9nOdoGsgCuzHz0r+74SiBbZqIM9QlyX7G7T4Jhz27lVTWUqi18khZEBTzYIhgxU13ZD U12InzxGs/b/Tdgu595k2Z7oO/HdPWhgIQ4AuUFzl9Y7JdhCeN1E31fBNQkDP+fwe+pi lDrGwTXYdDTXFy2u54egCn1WXeM+kFdWkke+ehEzFPVQ2VJ9IwHzRR63NZyyVbs9Su33 4J4bOZJqyImwGosSTirPZVnWuklzm5rNXDRPVXt+6dwK3Faffii/3BuBauetAYu4b/iF DH9wSAA6FcVxbECtLmecfpJMxCov/npr/jKlRkF9njhZf2s95Atb06DH86bjo3uyB+9F Fw== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k5sdvs6rg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 08:26:29 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29C8KqpA013574; Wed, 12 Oct 2022 08:26:27 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04fra.de.ibm.com with ESMTP id 3k30u9c8mb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 08:26:27 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29C8QOgE38535636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Oct 2022 08:26:24 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB158AE057; Wed, 12 Oct 2022 08:26:24 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E0F6AE045; Wed, 12 Oct 2022 08:26:23 +0000 (GMT) Received: from [9.197.246.63] (unknown [9.197.246.63]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 12 Oct 2022 08:26:23 +0000 (GMT) Message-ID: <8624a8c5-9c8d-418d-0e3b-7ad0f7017638@linux.ibm.com> Date: Wed, 12 Oct 2022 16:26:21 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680] Content-Language: en-US To: Segher Boessenkool Cc: Iain Sandoe , GCC Patches References: <9d9f1f43-b528-387d-45a7-1d89400de0fc@linux.ibm.com> <5B4DCBBB-3237-4A9F-ACCA-6669DE6905B8@sandoe.co.uk> <92415AC8-4A5A-4119-BFCC-D7C66472F961@sandoe.co.uk> <5e64fed0-7e79-3d60-da62-5c2bf3e2c707@linux.ibm.com> <20220929171100.GY25951@gate.crashing.org> <20221003211530.GQ25951@gate.crashing.org> <20221010135829.GA25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20221010135829.GA25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: qWYtV8W1DNp_mh5ouC8ee1V_pH8Rwvgd X-Proofpoint-GUID: qWYtV8W1DNp_mh5ouC8ee1V_pH8Rwvgd Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-12_03,2022-10-11_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210120052 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,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: Hi Segher! on 2022/10/10 21:58, Segher Boessenkool wrote: > On Mon, Oct 10, 2022 at 10:15:58AM +0800, Kewen.Lin wrote: >> on 2022/10/4 05:15, Segher Boessenkool wrote: >>> Right. If If mpowerpc64 is enabled while OS_MISSING_POWERPC64, warn for >>> that; >> >> Currently if option powerpc64 is enabled explicitly while OS_MISSING_POWERPC64, >> there is no warning. One typical case is -m32 compilation on ppc64. I made >> a patch to warn for this case as you suggested (btw, this change can be taken >> separately from this rework), it caused some test cases to fail as below: > > "Explicitly" means the user says "-m32 -mpowerpc64". > > I wonder what "on powerpc64" means in what you say, and why that would > matter? I guess you meant to ask "on ppc64"? I meant to say "ppc64-linux", sorry for the confusion. On ppc64-linux, OS_MISSING_POWERPC64 is defined as !TARGET_64BIT, the explicit option "-m32 -mpowerpc64" doesn't warn before but it's made to warn as the patch mentioned above, then need some test cases updates. > >> gcc.dg/vect/vect-82_64.c >> gcc.dg/vect/vect-83_64.c >> gcc.target/powerpc/bswap64-4.c >> gcc.target/powerpc/ppc64-double-1.c >> gcc.target/powerpc/pr106680-4.c >> gcc.target/powerpc/rs6000-fpint-2.c >> >> It's fine to fix them with one additional option "-w" to disable the warning. >> But IIUC one concern is that if we want to test with "--target_board=unix'{-m32, >> -m32/-mpowerpc64}'", the latter combination will always have this warning, >> with one extra "-w" (that is -m32/-mpowerpc64/-w) can make some cases which >> aim to check warning msg ineffective. So maybe we want to re-consider it >> (like just leaving it as before)? > > There will always be false positives (and negatives!) if you put any > warning options in RUNTESTFLAGS. -w is merely louder than most :-) > > But leave this as further improvement. Maybe put in a comment. OK. > >>> and if mpowerpc64 was only implicit, disable it as well (and say >>> we did!) >> >> But on ppc64 linux, for -m32 compilation mpowerpc64 is implicitly enabled >> since it's with bi-arch supported, I made a patch to disable it as well as >> warn it, it can't be bootstrapped since it warned for -m32 build (-Werror) >> and failed. So I refined it to something like: >> >> + /* With RS6000_BI_ARCH defined (bi-architecture (32/64) supported), >> + TARGET_DEFAULT has bit MASK_POWERPC64 on by default, to keep the >> + behavior consistent (like: no warnings for -m32 on ppc64), we >> + just sliently disable it. Otherwise, disable it and warn. */ >> + rs6000_isa_flags &= ~OPTION_MASK_POWERPC64; >> +#ifndef RS6000_BI_ARCH >> + warning (0, "powerpc64 is unexpected to be enabled on the " >> + "current OS"); >> +#endif > > It has nothing to do with biarch. Let's just not warn if it is so much > work to do it correctly. We never did before, and no one complained, > how bad can it be :-) > OK, I made a patch v2 which doesn't try to warn for them, fully tested it and just posted at: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603350.html BR, Kewen