From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id E45C03858C2F for ; Wed, 31 Aug 2022 21:38:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E45C03858C2F 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 (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27VKqlMi015711; Wed, 31 Aug 2022 21:38:06 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=OFGn9ytb2b9wCaAC/xgsvi2Bt3PP+m0Aj19bW6Tg0is=; b=DYIjHlqK54DuRKHahf/h0xazLkPWHBWuPXuFqQNAI4WQHtC31WEMNUkA02BLJ6+oUsE/ A0qpM3QQKVeLqwKE+TAebvHwDJcrhqaAkJkp7n4v+XqwvhA8UMGwvzTUc5Wc3wx9mIPs k4ZC2aHEVR44dXLwWNDW7jc35VEasiNksjddTYoCYJEapffMujGf/y88BdtxoswabSur CK9ZObexS3fgfrK5uNwA3B61TCo3ksGoALbsRkB54jir0LwVbvgQ1qFRa5q4AtCx+MZ4 DJ4asYefKYU1U8LPLstxxYS8oQzNUSUCyqhQGm2Qn+Omtt9T5tje/xAAepU1zPfX5p+Y oQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jaf2dh9xk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 21:38:05 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27VL10Fs015051; Wed, 31 Aug 2022 21:38:05 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jaf2dh9wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 21:38:05 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27VLc4Nr030974; Wed, 31 Aug 2022 21:38:04 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma05wdc.us.ibm.com with ESMTP id 3j7aw9vyba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 21:38:04 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27VLc3Jf131628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Aug 2022 21:38:04 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00A5EBE051; Wed, 31 Aug 2022 21:43:43 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5F33EBE054; Wed, 31 Aug 2022 21:43:42 +0000 (GMT) Received: from [9.160.4.32] (unknown [9.160.4.32]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 31 Aug 2022 21:43:42 +0000 (GMT) Message-ID: Date: Wed, 31 Aug 2022 16:38:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] rs6000/test: Fix bswap64-4.c with has_arch_ppc64 [PR106680] Content-Language: en-US To: Segher Boessenkool Cc: "Kewen.Lin" , GCC Patches , David Edelsohn References: <69277846-f587-b79e-f741-a2942d326778@linux.ibm.com> <20220831152412.GP25951@gate.crashing.org> <20220831160529.GR25951@gate.crashing.org> <16dc8d80-44d5-b739-b4a8-d02a01943d49@linux.ibm.com> <20220831192839.GT25951@gate.crashing.org> <20220831210750.GV25951@gate.crashing.org> From: Peter Bergner In-Reply-To: <20220831210750.GV25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: RXZOK9nILiw8SQHMziVcaV_fz-bNrM3P X-Proofpoint-GUID: mZbkq-ervFHWfAfujDHMniwAGDwbZL0U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-31_12,2022-08-31_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 clxscore=1015 spamscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=923 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208310102 X-Spam-Status: No, score=-3.8 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,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: On 8/31/22 4:07 PM, Segher Boessenkool wrote: > On Wed, Aug 31, 2022 at 02:53:07PM -0500, Peter Bergner wrote: >> Changing OS_MISSING_POWERPC64 as I mentioned would not add OPTION_MASK_POWERPC64 >> to our cpu masks when -m32 is used. > > So you say this is where the bug is? For linux64.h which is what I think the powerpc64-linux build will use, we have: linux64.h:#define OS_MISSING_POWERPC64 !TARGET_64BIT Doing the macro expansion by hand into: set_masks = POWERPC_MASKS; #ifdef OS_MISSING_POWERPC64 if (OS_MISSING_POWERPC64) set_masks &= ~OPTION_MASK_POWERPC64; #endif ...gives us: set_masks = POWERPC_MASKS; if (!TARGET_64BIT) set_masks &= ~OPTION_MASK_POWERPC64; So if we handled a -mpowerpc64 earlier on the command line and added OPTION_MASK_POWERPC64 to our cpu mask, then a following -m32 use will remove it here. So I mentioned doing: linux64.h: - #define OS_MISSING_POWERPC64 !TARGET_64BIT + #define OS_MISSING_POWERPC64 0 ...which disables the above code only for powerpc64-linux builds and doesn't affect AIX, Darwin, BSD, etc. or a powerpc-linux build. > The kernel has. But there are user space things (glibc) that haven't > been fixed, and those are default as well. Sure, but someone who is using -m32 -mpowerpc64 should know that and relying on a 32-bit glibc to save/restore the full 64-bit registers is a user error in my book. If you're using -m32 -mpower64, you better know what you are doing and the limitations you have to live under. Peter