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 7BF323858D37; Thu, 1 Dec 2022 02:23:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BF323858D37 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 (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B122MWl021916; Thu, 1 Dec 2022 02:23:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : message-id : from : to : cc : subject : references : content-type : mime-version; s=pp1; bh=Dp7fIO3ByPNdqQbdCowIRqnXDNCHNnGdWsC8dReth4Q=; b=Ci/MBdYlm8rADK5nZ2MBz0znOcW/e0Z9+4OMPXJmYiTNvCKELrjDgyJJdYfHIjn8QB3X 7uyAE/+LaT6rrLTiE602DUpVLjlKYYvkTsi3iOJzPwbGFUfgnuu6JCtTwmVUxmA8jmV1 AP1Hwn7VhETC9zqUycK1C3jHF5hGkHuhVsf/QqKKOqiQbt931c44ykWDoQi65t9oHToC PSnfxcJ3P9SfQjqocQn5zQjsKBshZg3PEiBj07uEjTXEcS4JMgzJZbMh0C5LcVl+yVd5 yrnrHqspOEYv5nYx6PYFoF15BXtv3NWSIO+OdG+tsWQqQG+9dBRfMmmMx0QqXZhSzwwG cw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6k4src3y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 02:23:08 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2B125VOj001935; Thu, 1 Dec 2022 02:23:08 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 3m6k4sra9y-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 02:23:08 +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 2B11pSaU009851; Thu, 1 Dec 2022 01:52:00 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma05wdc.us.ibm.com with ESMTP id 3m3t71uqqb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 01:52:00 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B11pxaC35651954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 01:51:59 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 32BEC5805A; Thu, 1 Dec 2022 01:51:59 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC20B5805C; Thu, 1 Dec 2022 01:51:58 +0000 (GMT) Received: from pike (unknown [9.5.12.127]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 1 Dec 2022 01:51:58 +0000 (GMT) Date: Thu, 01 Dec 2022 09:51:37 +0800 Message-Id: <7ev8mvx55i.fsf@pike.rch.stglabs.ibm.com> From: Jiufu Guo To: Segher Boessenkool Cc: "Kewen.Lin" , dje.gcc@gmail.com, linkw@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH V2] rs6000: Support to build constants by li/lis+oris/xoris References: <20221026114052.17713-1-guojiufu@linux.ibm.com> <9331dba8-f346-37e5-3340-055f2c4d9245@linux.ibm.com> <20221125144309.GG25951@gate.crashing.org> Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: TfGPqzLC1n3y1v55CM-8L-cUQag6Wj2U X-Proofpoint-GUID: N3_6NWFM_612ZIX6zgxJdMPFzfPz1DLW X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-30_04,2022-11-30_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0 bulkscore=0 impostorscore=0 spamscore=0 mlxlogscore=994 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010010 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,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: Date: Thu, 01 Dec 2022 09:51:32 +0800 In-Reply-To: <20221125144309.GG25951@gate.crashing.org> (Segher Boessenkool's message of "Fri, 25 Nov 2022 08:43:09 -0600") Message-ID: <7ewn7bx55n.fsf@pike.rch.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Segher Boessenkool writes: > Hi guys, > > On Fri, Nov 25, 2022 at 04:11:49PM +0800, Kewen.Lin wrote: >> on 2022/10/26 19:40, Jiufu Guo wrote: cut... >> > + >> > + HOST_WIDE_INT imm = (ud1 & 0x8000) ? ((ud1 ^ 0x8000) - 0x8000) >> > + : ((ud2 << 16) - 0x80000000); > > We really should have some "hwi::sign_extend (ud1, 16)" helper function, > heh. Maybe there already is? Ah, "sext_hwi". Fixing that up > everywhere in this function is preapproved. I just submit a patch to use sext_hwi for existing code: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607588.html Thanks for your help and spend time on this! BR, Jeff (Jiufu) > >> > + else cut... > > Could you comment what exact instructions are expected? > li;xoris and li;xoris and lis;xoris I guess? It helps if you just tell > the reader here. > > The li;oris and li;xoris parts look good. > > > Segher