On 9/12/19 11:27 AM, Richard Henderson wrote: >> +void VECTOR_HELPER(vadc_vxm)(CPURISCVState *env, uint32_t rs1, >> + uint32_t rs2, uint32_t rd) >> +{ > > Watch the spacing between functions. > Pass gpr rs1 by value. > >> +void VECTOR_HELPER(vadc_vim)(CPURISCVState *env, uint32_t rs1, >> + uint32_t rs2, uint32_t rd) >> +{ > ... >> + env->vfp.vreg[dest].u8[j] = sign_extend(rs1, 5) > > Pass the immediate as a sign-extended immediate to begin with, not as an > unsigned 5-bit field.
Oh, and of course *_vxm and *_vim should be identical, because in both cases there is a single scalar parameter. In the first case the scalar is passed by value from the gpr; in the second case the scalar is the sign-extended constant. r~