Re: [PATCH V3 2/3] RISC-V:Cache Management Operation instructions

2022-05-09 Thread Kito Cheng via Gcc-patches
Use unspec_volatile instead of unspec for those cache operations, because those operations have side effects, instruction scheduler might reorder those CMO operations if you use unspec. > diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md > index b3c5bce842a..d60843df490 100644 > -

[PATCH V3 2/3] RISC-V:Cache Management Operation instructions

2022-05-08 Thread shiyulong
From: yulong This commit adds cbo.clea,cbo.flush,cbo.inval,cbo.zero,prefetch.i,prefetch.r and prefetch.w instructions. diff with the previous two versions: 1.We change the instruction format from "prefetch.i\t%0" to "prefetch.i\t%a0" about the prefetch.i, cbo.clean, cbo.flush, cbo.inval, cbo.ze