From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 25DAA3858D1E for ; Mon, 6 Feb 2023 13:55:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25DAA3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1675691740; bh=LZl5Y4XNRnRLvqmuPD3Hcdb9NIoMD4OVyadjFbglynY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=D0f27DwoWVg5jiGNlY25M9SZfuLVgIXqsklAZCriqoVMnltQkZa63sO75P/oclA3N nuHMAzxhHGjH0VXnvTAM1IdWmMU+FTDXFX09LDlBy8CIlpCKW3apAmItFB+8Ie/wGh gM255OcNTs4hFxfpcVP1lcmZVEitAiJPkO476VSQ= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 0652965C3E; Mon, 6 Feb 2023 08:55:38 -0500 (EST) Message-ID: <65dd2fdc0e0d8f4f376970ce4bbe4343aaba9fa7.camel@xry111.site> Subject: Pushed: [PATCH] LoongArch: Generate bytepick.[wd] for suitable bit operation pattern From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org Cc: WANG Xuerui , Chenghua Xu Date: Mon, 06 Feb 2023 21:55:37 +0800 In-Reply-To: <046c8fce-99b8-17aa-e0e2-d3a17430ccc7@loongson.cn> References: <20230203175022.690671-1-xry111@xry111.site> <046c8fce-99b8-17aa-e0e2-d3a17430ccc7@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,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: On Mon, 2023-02-06 at 21:07 +0800, Lulu Cheng wrote: >=20 > =E5=9C=A8 2023/2/4 =E4=B8=8A=E5=8D=881:50, Xi Ruoyao =E5=86=99=E9=81=93: > > We can use bytepick.[wd] for > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 a << (8 * x) | b >> (8 * (sizeof(a) - x)= ) > >=20 > > while a and b are uint32_t or uint64_t.=C2=A0 This is useful for some c= ases, > > for example: > > https://sourceware.org/pipermail/libc-alpha/2023-February/145203.html > >=20 > > Bootstrapped and regtested on loongarch64-linux-gnu. > > Ok for trunk (now or GCC 14 stage 1)? >=20 > LGTM! >=20 > I think this change is not big and can be merged into the trunk branch. Pushed r13-5710. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University