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 1BCA63858CDB for ; Mon, 5 Feb 2024 11:49:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BCA63858CDB 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1BCA63858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707133771; cv=none; b=xPVCK639o0QpCCxW7XniGmVMHqKKEurmPZWy9s2AsK7uMjAIexMYOADqd8QqmuXZ5HNhjvH3AkOXqXEUMII3GcAXSujXBD5jBjkqNK18qsjr8ScuzvaKhEki4V6ReXU4qsPBWT/66MZ+PUXLz1MXyuIV0jKyT8Zl4ez1mFa0WK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707133771; c=relaxed/simple; bh=dAeZ4QJpP4yqCE3vI4Hcyr2V6c9i9v9ioFZtq3prqio=; h=DKIM-Signature:Message-ID:Date:Subject:To:From:MIME-Version; b=rSCA5Mj5PVbk2zYx1V6qdpd68j+z9AazShr0vOq654aUmfVeaid8aojBhe4wnL9ADCdDKbrRHrFVzhftDvVRMVFRIgsJ5Lx69s+LWDBfJgGQX0Qr/3EEaAXZLlUso7Ki+A4X064DrgXYtX8E33h6o0/dgQHLhRrpjo8DNe/giv8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 415BlEqT020493; Mon, 5 Feb 2024 11:49:15 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=wf4GxLOTe93F/nTI5N45daEi6HKjPYOmDnphEiPrvDA=; b=CgBmav8nRSPXIr/bmOXsM0cpOyrFmwmnkwnWCrp4jE2vDxqdmbU1Bju89KCTRkpaCC0y FB2i+lJSFsQkag0Zu5xJsiCBZ/9zbYYDdtkFmCrnwa+mtr4cFKSMd5elGSfaasd0Vx44 FODahQQpwUMrIUWtCGQdAZQalihjDduiLwaFSPsG+IA7ePuOHxE5q6gvz3fS/M9NK7s9 tkZryTfllYjbh5lbIsqSiWWpjT3YhIzqwPS+wJ7dl5+EXu6FSeHfqZLAs2WxzSrGDGe5 mP5x/Dlt3LsuHQhZacpp04AXKroCgivV6yj8Vx8HVdSIBv/QE3u3vOF39vTKn7+GpXSr tA== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w2y3tr1ex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Feb 2024 11:49:14 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4159HOND016154; Mon, 5 Feb 2024 11:49:13 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w22h1qpm3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Feb 2024 11:49:13 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 415BnCgp18678316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Feb 2024 11:49:12 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0ED3120040; Mon, 5 Feb 2024 11:49:12 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3C18D20043; Mon, 5 Feb 2024 11:49:10 +0000 (GMT) Received: from [9.197.250.241] (unknown [9.197.250.241]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 5 Feb 2024 11:49:09 +0000 (GMT) Message-ID: <9c44ec40-ed77-3560-f9e0-cc5749dc3360@linux.ibm.com> Date: Mon, 5 Feb 2024 19:49:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] rs6000: Rework option -mpowerpc64 handling [PR106680] Content-Language: en-US To: Sebastian Huber Cc: GCC Patches , Segher Boessenkool References: <63afd344-38fa-7a8e-4958-8256c2a9bca7@linux.ibm.com> <20221223202642.GC25951@gate.crashing.org> <2c854fba-8fc1-4c00-8562-396c0a0acdab@embedded-brains.de> From: "Kewen.Lin" In-Reply-To: <2c854fba-8fc1-4c00-8562-396c0a0acdab@embedded-brains.de> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: UnSw3lZdNbIfmlV6-zEJUhggA_M-DL5k X-Proofpoint-GUID: UnSw3lZdNbIfmlV6-zEJUhggA_M-DL5k Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_06,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1011 adultscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402050090 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: Hi Sebastian, on 2024/2/5 18:38, Sebastian Huber wrote: > Hello, > > On 27.12.22 11:16, Kewen.Lin via Gcc-patches wrote: >> 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. > > I am a bit late, however, this broke the 32-bit support for -mcpu=e6500. For RTEMS, I have the following multilibs: > > MULTILIB_REQUIRED += mcpu=e6500/m32 > MULTILIB_REQUIRED += mcpu=e6500/m32/mvrsave > MULTILIB_REQUIRED += mcpu=e6500/m32/msoft-float/mno-altivec > MULTILIB_REQUIRED += mcpu=e6500/m64 > MULTILIB_REQUIRED += mcpu=e6500/m64/mvrsave > > I configured GCC as a bi-arch compiler (32-bit and 64-bit). It seems you removed the -m32 handling, so I am not sure how to approach this issue. I added a test case to the PR: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106680 Thanks for reporting, I'll have a look at it (but I'm starting to be on vacation, so there may be slow response). I'm not sure what's happened in bugzilla recently, but I didn't receive any mail notifications on your comments #c5 and #c6 (sorry for the late response), since PR106680 is in state resolved maybe it's good to file a new one for further tracking. :) BR, Kewen