Re: [RFC PATCH v4 05/13] riscv: Add new csr defines related to vector extension

From: Guo Ren
Date: Mon Jun 01 2020 - 05:00:04 EST


On Mon, Jun 1, 2020 at 4:15 PM Greentime Hu <greentime.hu@xxxxxxxxxx> wrote:
>
> Guo Ren <guoren@xxxxxxxxxx> æ 2020å5æ31æ éæ äå9:56åéï
> >
> > Hi Greentime,
> >
> > Why remove vxrm and xstat ?
> >
> > > Appendix B: Calling Convention
> > > In the RISC-V psABI, the vector registers v0-v31 are all caller-saved. The vstart, vl, and vtype CSRs are also caller-saved.
> > > The vxrm and vxsat fields have thread storage duration.
> >
> Hi Guo,
>
> https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#vector-control-and-status-register-vcsr
> "The vxrm and vxsat separate CSRs can also be accessed via fields in
> the vector control and status CSR, vcsr."
>
> Since vcsr will save all these information, I think it should be ok to
> save vcsr only.

Got it, it's similar with fcsr & frm & fflags.

Acked-by: Guo Ren <guoren@xxxxxxxxxx>

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/