summaryrefslogtreecommitdiffstats
path: root/target/xtensa/translate.c
diff options
context:
space:
mode:
authorMax Filippov2019-02-10 08:21:44 +0100
committerMax Filippov2019-02-19 06:29:08 +0100
commit759039737504c3f11098f7240c6048c6279e2215 (patch)
treebdedf02668294fdfc0d1bd5f5aa9894ee2f6d3bd /target/xtensa/translate.c
parenttarget/xtensa: move xtensa_finalize_config to xtensa_core_class_init (diff)
downloadqemu-759039737504c3f11098f7240c6048c6279e2215.tar.gz
qemu-759039737504c3f11098f7240c6048c6279e2215.tar.xz
qemu-759039737504c3f11098f7240c6048c6279e2215.zip
target/xtensa: don't require opcode table sorting
Requirement for alphabetical opcode sorting in opcode tables is awkward and does not allow sharing implementation between multiple opcodes. Use hash tables to find opcodes by name. Move implementation from the translate.c to the helper.c to its only user and remove declaration from the cpu.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/translate.c')
-rw-r--r--target/xtensa/translate.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 62283cd1cc..26342aaa1f 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1274,20 +1274,6 @@ void restore_state_to_opc(CPUXtensaState *env, TranslationBlock *tb,
env->pc = data[0];
}
-static int compare_opcode_ops(const void *a, const void *b)
-{
- return strcmp((const char *)a,
- ((const XtensaOpcodeOps *)b)->name);
-}
-
-XtensaOpcodeOps *
-xtensa_find_opcode_ops(const XtensaOpcodeTranslators *t,
- const char *name)
-{
- return bsearch(name, t->opcode, t->num_opcodes,
- sizeof(XtensaOpcodeOps), compare_opcode_ops);
-}
-
static void translate_abs(DisasContext *dc, const uint32_t arg[],
const uint32_t par[])
{