From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 384243889E0D for ; Tue, 15 Nov 2022 09:33:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 384243889E0D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.20.4.52]) by gateway (Coremail) with SMTP id _____8AxXbbMXHNjRDYHAA--.9419S3; Tue, 15 Nov 2022 17:33:01 +0800 (CST) Received: from [10.20.4.52] (unknown [10.20.4.52]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxd1fLXHNjTIATAA--.34051S2; Tue, 15 Nov 2022 17:32:59 +0800 (CST) Subject: Re: [PATCH v2] LoongArch: Add prefetch instructions. To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn, xujiahao References: <20221112073756.912800-1-chenglulu@loongson.cn> <19d51ba96b1e0d509bedc2ee20ffc72a342f5d02.camel@xry111.site> <7c1bd73e7e05416a9d94085aa0f1ffd63671fd9d.camel@xry111.site> From: Lulu Cheng Message-ID: <506be736-e5d5-f867-9167-fc011c0bc822@loongson.cn> Date: Tue, 15 Nov 2022 17:32:59 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <7c1bd73e7e05416a9d94085aa0f1ffd63671fd9d.camel@xry111.site> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8Dxd1fLXHNjTIATAA--.34051S2 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvdXoW7Gry8KFyUZrW3CF4fJry5urg_yoWfXwb_Gw 48ZayI9F45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AM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,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: 在 2022/11/15 下午5:17, Xi Ruoyao 写道: > On Sat, 2022-11-12 at 17:45 +0800, Xi Ruoyao via Gcc-patches wrote: >> void prefetch(char *ptr, int off) >> { >>         return __builtin_prefetch(ptr + off); >> } >> >> It's compiled to "preldx 0,$r4,$r5".  I don't think it's correct >> because >> according to the doc, rk should contains several bit-fields instead of >> an offset. > Hi Lulu, > > Considering we are in stage 3 now and we can still push patches which > have been reviewed (in the first week of stage 3), I guess we can add > preld for GCC 13 and try preldx in the next development cycle? > > BTW if preldx behaves exactly as how the manual says, I think it's not > possible to invoke it correctly in GNU C unless using inline assembly... > Well, I also want to add preld and instant load optimization support in this release. I will send patch in the next two days:-)