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 B80E93858D33 for ; Tue, 27 Dec 2022 10:17:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B80E93858D33 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 (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BR9uueU027738; Tue, 27 Dec 2022 10:17:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=DXvFHWrmIBKNweTqIjqpsmh8ad3onHdQ0Hy52ZRMA04=; b=eY3udN0iX/ru5A7HkjiTic7UNai/IEUOa3yvtdKFsUJUS+JhsgdPe/XwUEGY5ngsXnDx R1BtoX6cjBnxFF7CB+XxGqZaLSM8ci+lgjqFq5iA6LQO9jHsP1sWrm7FAaSFfuzPC7XP virAznC3yfmmBpeM5vj67HqpZs+hHSLl3t72aui1zETtqGY4d7LQZcVw6UJqsDhqzD1D UHIIN9rGhxf2p96Xi6a05mdQRhOm+tJnSInJfPRIE3t0Ssbf/blVZsR3skp7XR0bi+6t 4b3Zx0RGyFa7VNPUYSjDHKXEj1BcybxNPVb2f44ZHd7G040kcBXOpUGjJY1v0l7scxap yQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mqxh88b8f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Dec 2022 10:17:09 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2BRAH84G012418; Tue, 27 Dec 2022 10:17:08 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mqxh88b7p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Dec 2022 10:17:08 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 2BQJNHqX005591; Tue, 27 Dec 2022 10:17:06 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3mns26kbur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Dec 2022 10:17:06 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2BRAH3fh36897078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Dec 2022 10:17:03 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1F5E20065; Tue, 27 Dec 2022 10:17:03 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF1192004B; Tue, 27 Dec 2022 10:17:01 +0000 (GMT) Received: from [9.197.239.125] (unknown [9.197.239.125]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 27 Dec 2022 10:17:01 +0000 (GMT) Message-ID: Date: Tue, 27 Dec 2022 18:16:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2] rs6000: Rework option -mpowerpc64 handling [PR106680] Content-Language: en-US To: Segher Boessenkool Cc: GCC Patches , Iain Sandoe , David Edelsohn , Peter Bergner References: <63afd344-38fa-7a8e-4958-8256c2a9bca7@linux.ibm.com> <20221223202642.GC25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20221223202642.GC25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XpmiJD-Rq6dM4MrOe2LYTeZZWHAWSOH0 X-Proofpoint-GUID: az_4KMHyWXF9PWcbvPelFsU8ry47E8Ib X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-27_06,2022-12-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=708 priorityscore=1501 clxscore=1015 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212270083 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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/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_POWERPC64, >> + since they don't support saving the high part of 64-bit registers 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 half > of the GPRs correctly in all cases", something like that? > > Okay for trunk like that. Thanks! > Thanks! Adjusted as you suggested and committed in r13-4894-gacc727cf02a144. BR, Kewen