On 4/14/21 12:11 PM, Richard Henderson wrote:
static bool
allow_prefix_MLS(DisasContext *ctx, arg_D *a)
{
     int64_t imm;

     /* Require MLS prefix or no prefix. */
     if (ctx->prefix_type != PREFIX_MLS) {
         if (ctx->prefix_type == PREFIX_NONE) {
             return true;
         }
         gen_invalid(ctx);
         return false;
     }

Combined with the switch on prefix_type in translate_insn, I think this can just simplify to

    if (ctx->prefix_type != PREFIX_MLS) {
        return ctx->prefix_type == PREFIX_NONE;
    }

because decode_legacy is only called from within PREFIX_NONE.


r~

Reply via email to