From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id D8EBD3858CDB for ; Mon, 5 Feb 2024 10:38:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8EBD3858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D8EBD3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.10.215.148 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707129521; cv=none; b=JS3sN8IiYoPHnvOOB7ns6Br2+TpMOatIvt2bs0L36CmT8oXYAJJkFsl4u66RJv9stGzqcDWm8Fppj/U4xzOO2C3GxRS+yslTjHVkGmHsdUUOM/R7iuR3AMSnA8Q3GBACG2MDh8AP2bU8/Lpmqk/V9dW1WhCnqlEqpdJqxfBnuQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707129521; c=relaxed/simple; bh=sB52CchO+ONNHNyJopb/7uvLfqbImjgLkQwHVPlO2s8=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=sJSa83o6q/uzzT39sjL4lcEHMhBVHspGf1vE2wHiew8GRBf9JBosL4qDA8NohIwemnqE7Lcc2p4VhbUZWVLzmfyqUM06EfW74RzL3FPTstuHbDvHxviJb4ypKksLGt7V+7Jn9BFfliuexvtjDJgO4Iuw1y/aQvlCAmeTukYPGnA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from sslproxy04.your-server.de ([78.46.152.42]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rWwMy-000CJZ-Jc; Mon, 05 Feb 2024 11:38:32 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rWwMy-000QEh-GM; Mon, 05 Feb 2024 11:38:32 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 207EE480162; Mon, 5 Feb 2024 11:38:32 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10032) with ESMTP id inUkc9GqkYfp; Mon, 5 Feb 2024 11:38:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A571D480174; Mon, 5 Feb 2024 11:38:31 +0100 (CET) X-Virus-Scanned: amavis at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10026) with ESMTP id HOoKjToejx72; Mon, 5 Feb 2024 11:38:31 +0100 (CET) Received: from [10.10.171.10] (unknown [10.10.171.10]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 5EAE7480162; Mon, 5 Feb 2024 11:38:31 +0100 (CET) Message-ID: <2c854fba-8fc1-4c00-8562-396c0a0acdab@embedded-brains.de> Date: Mon, 5 Feb 2024 11:38:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] rs6000: Rework option -mpowerpc64 handling [PR106680] Content-Language: en-US To: "Kewen.Lin" , Segher Boessenkool Cc: GCC Patches References: <63afd344-38fa-7a8e-4958-8256c2a9bca7@linux.ibm.com> <20221223202642.GC25951@gate.crashing.org> From: Sebastian Huber In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldi-networks.de X-Virus-Scanned: Clear (ClamAV 0.103.10/27176/Mon Feb 5 10:35:30 2024) X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,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 List-Id: Hello, On 27.12.22 11:16, Kewen.Lin via Gcc-patches wrote: > Hi Segher, >=20 > on 2022/12/24 04:26, Segher Boessenkool wrote: >> Hi! >> >> On Wed, Oct 12, 2022 at 04:12:21PM +0800, Kewen.Lin wrote: >>> PR106680 shows that -m32 -mpowerpc64 is different from >>> -mpowerpc64 -m32, this is determined by the way how we >>> handle option powerpc64 in rs6000_handle_option. >>> >>> Segher pointed out this difference should be taken as >>> a bug and we should ensure that option powerpc64 is >>> independent of -m32/-m64. So this patch removes the >>> handlings in rs6000_handle_option and add some necessary >>> supports in rs6000_option_override_internal instead. >> >> Sorry for the late review. >> >>> + /* Don't expect powerpc64 enabled on those OSes with OS_MISSING_PO= WERPC64, >>> + since they don't support saving the high part of 64-bit registe= rs on >>> + context switch. If the user explicitly specifies it, we won't = interfere >>> + with the user's specification. */ >> >> It depends on the OS, and what you call "context switch". For example >> on Linux the context switches done by the kernel are fine, only things >> done by setjmp/longjmp and getcontext/setcontext are not. So just be = a >> bit more vague here? "Since they do not save and restore the high hal= f >> of the GPRs correctly in all cases", something like that? >> >> Okay for trunk like that. Thanks! >> >=20 > Thanks! Adjusted as you suggested and committed in r13-4894-gacc727cf0= 2a144. I am a bit late, however, this broke the 32-bit support for -mcpu=3De6500= .=20 For RTEMS, I have the following multilibs: MULTILIB_REQUIRED +=3D mcpu=3De6500/m32 MULTILIB_REQUIRED +=3D mcpu=3De6500/m32/mvrsave MULTILIB_REQUIRED +=3D mcpu=3De6500/m32/msoft-float/mno-altivec MULTILIB_REQUIRED +=3D mcpu=3De6500/m64 MULTILIB_REQUIRED +=3D mcpu=3De6500/m64/mvrsave I configured GCC as a bi-arch compiler (32-bit and 64-bit). It seems you=20 removed the -m32 handling, so I am not sure how to approach this issue.=20 I added a test case to the PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106680 --=20 embedded brains GmbH & Co. KG Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht M=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/