From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id F13BC3858D1E for ; Mon, 3 Oct 2022 21:16:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F13BC3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 293LFWxZ026390; Mon, 3 Oct 2022 16:15:32 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 293LFU9r026389; Mon, 3 Oct 2022 16:15:30 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 3 Oct 2022 16:15:30 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: Iain Sandoe , GCC Patches Subject: Re: [PATCH] rs6000: Rework option -mpowerpc64 handling [PR106680] Message-ID: <20221003211530.GQ25951@gate.crashing.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 30, 2022 at 08:15:37PM +0800, Kewen.Lin wrote: > on 2022/9/30 01:11, Segher Boessenkool wrote: > >> +#ifdef OS_MISSING_POWERPC64 > >> + else if (OS_MISSING_POWERPC64) > >> + /* It's unexpected to have OPTION_MASK_POWERPC64 on for OSes which > >> + miss powerpc64 support, so disable it. */ > >> + rs6000_isa_flags &= ~OPTION_MASK_POWERPC64; > >> +#endif > > > > All silent stuff is always bad. > > OK, with more testings for replacing warning instead of silently disablement > I noticed that some disablement is needed, one typical case is -m32 compilation > on ppc64, we have OPTION_MASK_POWERPC64 on from TARGET_DEFAULT which is used > for initialization (It makes sense to have it on in TARGET_DEFAULT because > of it's 64 bit cpu). And -m32 compilation matches OS_MISSING_POWERPC64 > (!TARGET_64BIT), so it's the case that we have an implicit OPTION_MASK_POWERPC64 > on and OS_MISSING_POWERPC64 holds, but it's unexpected not to disable it but > warn it. Right. If If mpowerpc64 is enabled while OS_MISSING_POWERPC64, warn for that; and if mpowerpc64 was only implicit, disable it as well (and say we did!) Segher