On Wed, Mar 17, 2021 at 3:44 PM Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> On 3/17/21 11:39 AM, Alistair Francis wrote:
> > @@ -1312,8 +1320,8 @@ int riscv_csrrw(CPURISCVState *env, int csrno, 
> > target_ulong *ret_value,
> >           return -RISCV_EXCP_ILLEGAL_INST;
> >       }
> >       ret = csr_ops[csrno].predicate(env, csrno);
> > -    if (ret < 0) {
> > -        return ret;
> > +    if (ret > 0) {
> > +        return -ret;
> >       }
>
> I think you want
>
>    if (ret != RISCV_EXCP_NONE) {
>       return -ret;
>    }
>
> here.  But of course this outer interface is still confused until patches 4+5.
>   So perhaps it doesn't matter.

It probably doesn't, but it reduces churn so I have fixed this.

Alistair

>
>
> r~

Reply via email to