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 2CC61381ECA3; Wed, 7 Dec 2022 07:55:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2CC61381ECA3 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 (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B77CWnN029361; Wed, 7 Dec 2022 07:55:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : cc : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=F6VasJ4DKX+Z/xoru8mz+xE0FL1xapPxlUQftOHPtfE=; b=CpImxATBNJexp8nyQTWZmRDcBd0QZMY3RQ5KmjaAtELxOls6LxOXL8kA7cobs7a8SxaV /F2tWMYggdAA4r4xaTzvg7IiUuwdinVkHX+xy/+cHX1qzV6Kcj3roCMtu8onrLMwHQvQ veFOi8kXDetjMdSl199WFpk466cbFaP2MfZU/h31a1S2lG2vUIwWfSM3Z6yCDwXDtUqa agu69gRXsrpGWno7mjwmtDMuehxkHW+Oq+Bv1MDQAWzsOlxOpccId+MVYAweCAzlT5ZD pHqDWscAtAl5j9yZu0n3SXVuNKAxQB2lBG52e+KfX1KlL3WpbqgZPWVcHkEzA8lPUxhw 7A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3map7wrxs9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Dec 2022 07:55:53 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2B77m1ou008209; Wed, 7 Dec 2022 07:55:53 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3map7wrxra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Dec 2022 07:55:53 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.16.1.2) with ESMTP id 2B6DKdSJ016457; Wed, 7 Dec 2022 07:55:49 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3m9m6y1w9c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Dec 2022 07:55:49 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B77tjfr42271162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Dec 2022 07:55:45 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5F0620040; Wed, 7 Dec 2022 07:55:45 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 502CA20043; Wed, 7 Dec 2022 07:55:43 +0000 (GMT) Received: from [9.197.224.206] (unknown [9.197.224.206]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 7 Dec 2022 07:55:42 +0000 (GMT) Message-ID: Date: Wed, 7 Dec 2022 15:55:41 +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 1/3] Rework 128-bit complex multiply and divide, PR target/107299 Content-Language: en-US To: Michael Meissner References: <997752a6-8cd4-abc5-d6e3-2e75eaa37d57@linux.ibm.com> Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Peter Bergner , William Seurer , Will Schmidt From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: AkxzGcdEIiEyPM0Rj29SzrDiCCpl2McV X-Proofpoint-GUID: GTO29bK5Jh2eOK7KwjtYzMYGmNZa0MXP 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-07_04,2022-12-06_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 phishscore=0 spamscore=0 bulkscore=0 mlxlogscore=636 suspectscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212070061 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 Mike, on 2022/12/7 14:44, Michael Meissner wrote: > On Tue, Dec 06, 2022 at 05:36:54PM +0800, Kewen.Lin wrote: >> Hi Mike, >> >> Thanks for fixing this! >> >> Could you help to elaborate why we need to disable it during libgcc building? > > When you are building libgcc, you are building the __mulkc3, __divkc3 > functions. The mapping in the compiler interferes with those functions, > because at the moment, libgcc uses an alternate IEEE 128-bit type. > But I'm still confused. For __mulkc3 (__divkc3 is similar), 1) with -mabi=ieeelongdouble (TARGET_IEEEQUAD true, define __LONG_DOUBLE_IEEE128__), the used types are: typedef float TFtype __attribute__ ((mode (TF))); typedef __complex float TCtype __attribute__ ((mode (TC))); 2) with -mabi=ibmlongdouble (TARGET_IEEEQUAD false, not __LONG_DOUBLE_IEEE128__ defined), the used types are: typedef float TFtype __attribute__ ((mode (KF))); typedef __complex float TCtype __attribute__ ((mode (KC))); The proposed mapping in the current patch is: + + if (id == complex_multiply_builtin_code (KCmode)) + newname = "__mulkc3"; + + else if (id == complex_multiply_builtin_code (ICmode)) + newname = "__multc3"; + + else if (id == complex_multiply_builtin_code (TCmode)) + newname = (TARGET_IEEEQUAD) ? "__mulkc3" : "__multc3"; for 1), TCmode && TARGET_IEEEQUAD => "__mulkc3" for 2), KCmode => "__mulkc3" Both should be still with name "__mulkc3", do I miss anything? BR, Kewen > I have a patch for making libgcc use the 'right' type that I haven't submitted > yet. This is because the more general fix that these 3 patches do impacts other > functions (due to __float128 and _Float128 being different in the current > compiler when -mabi=ieeelongdouble). >