Re: [PATCH v2] LoongArch: Add prefetch instructions.

2022-11-15 Thread Lulu Cheng
在 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

Re: [PATCH v2] LoongArch: Add prefetch instructions.

2022-11-15 Thread Xi Ruoyao via Gcc-patches
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-fiel

Re: [PATCH v2] LoongArch: Add prefetch instructions.

2022-11-12 Thread Xi Ruoyao via Gcc-patches
On Sat, 2022-11-12 at 15:37 +0800, Lulu Cheng wrote: > Co-Authored-By: xujiahao > > gcc/ChangeLog: > > * config/loongarch/loongarch-def.c: Initial number of parallel > prefetch. > * config/loongarch/loongarch-tune.h (struct loongarch_cache): > Define number of parallel pr