On 12/15/20 8:01 PM, frank.ch...@sifive.com wrote:
> +static bool trans_gorci(DisasContext *ctx, arg_gorci *a)
> +{
> +    REQUIRE_EXT(ctx, RVB);
> +
> +    if (a->shamt >= TARGET_LONG_BITS) {
> +        return false;
> +    }

Check should be in gen_shifti.

> +static bool trans_gorciw(DisasContext *ctx, arg_gorciw *a)
> +{
> +    REQUIRE_EXT(ctx, RVB);
> +
> +    if (a->shamt >= 32) {
> +        return false;
> +    }

Check is unnecessary due to @sh5.

> +static void gen_gorcw(TCGv ret, TCGv arg1, TCGv arg2)
> +{
> +    tcg_gen_ext32u_tl(arg1, arg1);
> +    gen_helper_gorc(ret, arg1, arg2);
> +}

Calling the wrong helper.  The zero-extension should be unnecessary -- the high
bits will be overridden by the sign-extension at the end of gen_shiftw.


r~

Reply via email to