|
From: | Richard Henderson |
Subject: | Re: [PATCH 5/5] target/ppc: Implement paddi and replace addi insns |
Date: | Thu, 15 Apr 2021 09:59:08 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 4/14/21 12:11 PM, Richard Henderson wrote:
This approach seems like it will work fine for MLS and MMIR prefixes. For 8LS, 8RR, and MRR prefixes, we'll need some extra help within ppc_tr_translate_insn. E.g.insn = translator_ldl_swap(env, ctx->base.pc_next, need_byteswap(ctx)); switch (ctx->prefix_type) { case PREFIX_NONE: ok = decode_opcode_space_0(ctx, insn) || decode_legacy(ctx, insn); break; case PREFIX_MLS: case PREFIX_MMIRR: ok = decode_opcode_space_0(ctx, insn); break;
I played about with this last night, and there's an interesting trade-off: (1) The thousands of 32-bit insns which do not allow prefixes now each require 3 lines to assert that no prefix is present, (2) There are only 12 MLS and 29 MMIRR prefixed insns.I think it may well be that eliminating boiler-plate from thousands of insns it a good trade-off to special-casing 41 insns.
At which point, considering the multiple variations on 8RR and MMIRR prefixes, seems to indicate that we should decode all 64 bits all at once.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |