Re: Re: [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp
On 2023-05-08 10:48 Kito Cheng wrote: > >diff --git a/gcc/config/riscv/zc.md b/gcc/config/riscv/zc.md >new file mode 100644 >index 000..1c2f390269e >--- /dev/null >+++ b/gcc/config/riscv/zc.md >@@ -0,0 +1,55 @@ >... >+(define_insn "gpr_multi_pop" >+ [(unspec_volatile [(match_operand 0 "const_int_operand") >+ (match_operand 1 "const_int_operand")] >+ UNSPECV_GPR_MULTI_POP)] > >I would strongly suggest modeling the right memory and register access >here correctly instead of using unspec, >and same for other two patterns. > >That will help GCC know the semantics of this operation. Sure, working on it. BR, Fei
Re: [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp
diff --git a/gcc/config/riscv/zc.md b/gcc/config/riscv/zc.md new file mode 100644 index 000..1c2f390269e --- /dev/null +++ b/gcc/config/riscv/zc.md @@ -0,0 +1,55 @@ ... +(define_insn "gpr_multi_pop" + [(unspec_volatile [(match_operand 0 "const_int_operand") + (match_operand 1 "const_int_operand")] +UNSPECV_GPR_MULTI_POP)] I would strongly suggest modeling the right memory and register access here correctly instead of using unspec, and same for other two patterns. That will help GCC know the semantics of this operation.