target/xtensa: don't specify windowed registers manually
PATCH 1/1 target/xtensa: don't specify windowed registers manually
Use libisa to extract whether opcode uses windowed registers and construct mask based on that. This only leaves special case for the 'entry' opcode, as it needs to probe a register dynamically.
Signed-off-by Max Filippov <[email protected]>
--- target/xtensa/cpu.h | 2 +- target/xtensa/helper.c | 1 + target/xtensa/translate.c | 493 +--------------------------------------------- 3 files changed, 12 insertions(+), 484 deletions(-)
target/xtensa/cpu.h +1 -1
@@ -380,7 +380,6 @@ typedef struct XtensaOpcodeOps {XtensaOpcodeUintTest test_overflow;const uint32_t *par;uint32_t op_flags; -uint32_t windowed_register_op;uint32_t coprocessor; } XtensaOpcodeOps;
@@ -438,6 +437,7 @@ struct XtensaConfig {xtensa_isa isa;XtensaOpcodeOps **opcode_ops;const XtensaOpcodeTranslators **opcode_translators; +xtensa_regfile a_regfile;uint32_t clock_freq_khz;
target/xtensa/helper.c +1 -0
@@ -88,6 +88,7 @@ static void init_libisa(XtensaConfig *config)#endif config->opcode_ops[i] = ops; } + config->a_regfile =xtensa_regfile_lookup (config->isa,"AR" ); }void xtensa_finalize_config (XtensaConfig *config)
target/xtensa/translate.c +10 -483
2,847 lines not on this page · raw message
Signature · 1 line
2.11.0