Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4186580rwl; Mon, 10 Apr 2023 07:24:39 -0700 (PDT) X-Google-Smtp-Source: AKy350aWi+liBy6cIRQG8dr+ye45OaTaaMnEZrqrXYNqLP77yCUwrU0njY7eSv9WJTWYzhL6IOD4 X-Received: by 2002:a17:906:32d1:b0:877:8a55:2a26 with SMTP id k17-20020a17090632d100b008778a552a26mr7540234ejk.60.1681136678966; Mon, 10 Apr 2023 07:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681136678; cv=none; d=google.com; s=arc-20160816; b=blM5OX2dhgOVDUwEux2R7iXc3KrZv2jwsA+Z3Yp1dQYXb8/woORaMFMf9g4qIFlueZ nY5OT+GbEHqZl9Hvz50A9j1jeZ/zdJDEqJ+ehpN9qspUp2SnVCKW/yToLZ4TE+t8L/ws +hIbUYVzeRp+2yY1d8/4W9WlUQggl/u6sYxHprSvkXy3BhW3T97ZqM+v2n6gz5sUQvoC RK0tzt3rGFkJYzwWPRJWXUBEG05WxjhPblcfojC8SiUBfeXD8BXxbRWaNlwImqmSEfRG 0xD+BnVjN58UssPMoB8k2pcmrfwIAidyTpEnzQmP971oKutN3LASfvrPHrSzeehSnQBm KzAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=GaY9R9x52xA8DlpsZKM/md7txfGeF2MrAa48KjCOKgo=; b=Ee/ZFrd9k/8WEe8hnAoR1TaXaM3x2eJqxAwvVRQO0LQiLdej81ohHJWBYarAlBzcyZ 4GwR0jXbydj/FxUZhONZeEIGezEYMwnfVJx4C2Ob+m523gpXXXx/xiaxkRcUgIlAk2l5 c6YXolI51jQ0zQOiUFwfSjsb/zrMSePEzrqmhXuHlq7naQF63epNk9D1xcq4/vnjH76C xwg5M466dxogjvc/80gtoN8UwqBqSWgFv2T+eI8DmQhKYCzDkkHFiFAvyZsHCGGOpYdg fG+dHDDf8jzmCgFJppsjH0tYRmENCEFNGc6DLkzxBpm0LaqlGq09XGvVb2DDPzmTGtyl 5qEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020aa7d98d000000b00504b6084b6fsi445865eds.654.2023.04.10.07.23.49; Mon, 10 Apr 2023 07:24:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjDJOUJ convert rfc822-to-8bit (ORCPT + 99 others); Mon, 10 Apr 2023 10:20:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjDJOUI (ORCPT ); Mon, 10 Apr 2023 10:20:08 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 046102689 for ; Mon, 10 Apr 2023 07:20:04 -0700 (PDT) Received: from loongson.cn (unknown [209.85.128.41]) by gateway (Coremail) with SMTP id _____8Axkk4SGzRktCEZAA--.38625S3; Mon, 10 Apr 2023 22:20:03 +0800 (CST) Received: from mail-wm1-f41.google.com (unknown [209.85.128.41]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxIL8OGzRkvaYcAA--.64977S3; Mon, 10 Apr 2023 22:20:02 +0800 (CST) Received: by mail-wm1-f41.google.com with SMTP id gw13so2874357wmb.3 for ; Mon, 10 Apr 2023 07:20:01 -0700 (PDT) X-Gm-Message-State: AAQBX9fdG3Ne5nfDIxB48t55RwF51lLWpYCOYQgZqZpSzsPXu/e+uNSx BD0qcgYDmBy0aWymmBcF6gMpwclA3BRBWWIo04vn8A== X-Received: by 2002:a1c:7708:0:b0:3ed:d2fc:2fe7 with SMTP id t8-20020a1c7708000000b003edd2fc2fe7mr2187905wmi.0.1681136398193; Mon, 10 Apr 2023 07:19:58 -0700 (PDT) MIME-Version: 1.0 References: <20230410115734.93365-1-wangrui@loongson.cn> In-Reply-To: From: Rui Wang Date: Mon, 10 Apr 2023 22:19:47 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: Improve memory ops To: Xi Ruoyao Cc: Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-CM-TRANSID: AQAAf8AxIL8OGzRkvaYcAA--.64977S3 X-CM-SenderInfo: pzdqw2txl6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29K BjDU0xBIdaVrnRJUUU9Fb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26c xKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vE j48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxV AFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E 14v26F4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280 aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7V AKI48JMxAqzxv262kKe7AKxVWUXVWUAwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C2 67AKxVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI 8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWU CwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r 1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsG vfC2KfnxnUUI43ZEXa7IU1CPfJUUUUU== X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 10, 2023 at 8:20 PM Xi Ruoyao wrote: > > On Mon, 2023-04-10 at 19:57 +0800, WANG rui wrote: > > + /* align up address */ > > + andi t1, a0, 7 > > + sub.d a0, a0, t1 > > bstrins.d a0, zero, 2, 0 > > Likewise for other aligning operations if the temporary is not used. I think we're on the same page. I had previously tested this on the user-space version[1], but it's not a performance-critical area. [1] https://github.com/heiher/mem-bench/blob/0083d4e5a82e57939517413da3bcad81e01adbea/memset-int.S#L35-L37 Regards, Rui