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 359F83858D37 for ; Tue, 23 May 2023 22:30:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 359F83858D37 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 (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34NMAK8m020752; Tue, 23 May 2023 22:30:53 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=HDvXttbZwGtASNqabqymgw7uJqLYYH3Y0G0GP2ABBMY=; b=TPVurVmylb+zoN/IOjcnKYMRQjnX/JBWSVbnnuTiiK+9k3qC8gLXl+ZnzR1hkFsvTx7E 0qOMLO/HcQ6G8J3WSn+O+Z9BGHvG8G5PWXozT+OHvikgzhe/o4HE+1l6J7g5pSdAhn7Z 3Hxx4r/3Q0wOLX+Uy7YvZ0z0pgYvdGwk7vV/UNhS7oFhI88zPMD3EmDWPhUcDQp9bBdn GPkkqQCdbpPrzgyIJMCcvAFXbDpHgbOwJjjr2os/GYwrM6koRQOxK99OXvRfoxh/60/F BcLe/gDy404yo98y6qQryTx4ka6mmZxFFNaVp9PQGd3ZGdYGJeoucZ4z/c4d1zGIUYMV mg== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qs4d72hhh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 22:30:52 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34NJhHvf009110; Tue, 23 May 2023 22:30:51 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([9.208.129.118]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3qppc5h68t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 22:30:51 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34NMUnku44040530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 May 2023 22:30:49 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65DEC58051; Tue, 23 May 2023 22:30:49 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EBAE35805C; Tue, 23 May 2023 22:30:48 +0000 (GMT) Received: from [9.61.75.172] (unknown [9.61.75.172]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 23 May 2023 22:30:48 +0000 (GMT) Message-ID: Date: Tue, 23 May 2023 17:30:48 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] rs6000: Add buildin for mffscrn instructions Content-Language: en-US To: "Kewen.Lin" , Carl Love Cc: Segher Boessenkool , gcc-patches@gcc.gnu.org References: <4f1af7ba04999d0258354b8e6794621ee303ec53.camel@us.ibm.com> From: Peter Bergner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: FEI8SG-BHu_Gz1IejYzve930Rp06katn X-Proofpoint-ORIG-GUID: FEI8SG-BHu_Gz1IejYzve930Rp06katn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_14,2023-05-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 clxscore=1015 mlxlogscore=687 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230177 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,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 5/23/23 12:24 AM, Kewen.Lin wrote: > on 2023/5/23 01:31, Carl Love wrote: >> The builtins were requested for use in GLibC. As of version 2.31 they >> were added as inline asm. They requested a builtin so the asm could be >> removed. > > So IMHO we also want the similar support for mffscrn, that is to make > use of mffscrn and mffscrni on Power9 and later, but falls back to > __builtin_set_fpscr_rn + mffs similar on older platforms. So __builtin_set_fpscr_rn everything we want (sets the RN bits) and uses mffscrn/mffscrni on P9 and later and uses older insns on pre-P9. The only problem is we don't return the current FPSCR bits, as the bif is defined to return void. Crazy idea, but could we extend the built-in with an overload that returns the FPSCR bits? To be honest, I like the __builtin_set_fpscr_rn name better than __builtin_mffscrn[i]. The built-in machinery can see that the usage is expecting a return value or not and for the pre-P9 code, can skip generating the ending mffs if we don't want the return value. Peter