On 10/24/21 07:04, Richard Henderson wrote: > On 10/23/21 2:47 PM, Philippe Mathieu-Daudé wrote: >> Convert the FILL opcode (Vector Fill from GPR) to decodetree. >> >> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> >> --- >> target/mips/tcg/msa.decode | 2 ++ >> target/mips/tcg/msa_translate.c | 40 +++++++++++++++++++++++---------- >> 2 files changed, 30 insertions(+), 12 deletions(-)
>> +static bool trans_FILL(DisasContext *ctx, arg_msa_r *a) >> +{ >> + TCGv_i32 twd; >> + TCGv_i32 tws; >> + TCGv_i32 tdf; >> + >> + if (!check_msa_access(ctx)) { >> + return false; >> + } >> + >> + if (TARGET_LONG_BITS != 64 && a->df == DF_DOUBLE) { >> + /* Double format valid only for MIPS64 */ >> + gen_reserved_instruction(ctx); >> + return true; >> + } > > I expect this reserved check should be above the MSA is disabled check, > within check_msa_access. > >> + twd = tcg_const_i32(a->wd); >> + tws = tcg_const_i32(a->ws); > > tcg_constant_i32. Hmm I am confused here, only 'df' is constant, 'ws' is GPR[$rs]. Since it is limited in [0,32[ and used read-only by the helper, we can also pass it as constant?