On 12/15/20 8:01 PM, frank.ch...@sifive.com wrote: > +target_ulong HELPER(grevw)(target_ulong rs1, target_ulong rs2) > +{ > + return do_grev(rs1, rs2, 32); > +} > + > +#endif > + > diff --git a/target/riscv/helper.h b/target/riscv/helper.h
Stray whitespace at the end of the file. checkpatch or git should have complained about this. > +static bool gen_grevi(DisasContext *ctx, arg_grevi *a) > +{ > + TCGv source1 = tcg_temp_new(); > + TCGv source2; > + > + gen_get_gpr(source1, a->rs1); > + > + if (a->shamt == (TARGET_LONG_BITS - 8)) { > + /* rev8, byte swaps */ > +#ifdef TARGET_RISCV32 > + tcg_gen_bswap32_tl(source1, source1); > +#else > + tcg_gen_bswap64_tl(source1, source1); > +#endif I should add a tcg_gen_bswap_tl define so that this ifdef is not necessary. For the to-do list... Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~