target/mips: Introduce decodetree helpers for Release6 LSA/DLSA opcodes
[qemu.git] / target / mips / rel6_translate.c
blobda70ff9662b7ea166283c37ff42ec810fba4edf3
1 /*
2 * MIPS emulation for QEMU - # Release 6 translation routines
4 * Copyright (c) 2004-2005 Jocelyn Mayer
5 * Copyright (c) 2006 Marius Groeger (FPU operations)
6 * Copyright (c) 2006 Thiemo Seufer (MIPS32R2 support)
7 * Copyright (c) 2020 Philippe Mathieu-Daudé
9 * This code is licensed under the GNU GPLv2 and later.
12 #include "qemu/osdep.h"
13 #include "tcg/tcg-op.h"
14 #include "exec/helper-gen.h"
15 #include "translate.h"
17 /* Include the auto-generated decoder. */
18 #include "decode-mips32r6.c.inc"
19 #include "decode-mips64r6.c.inc"
21 static bool trans_LSA(DisasContext *ctx, arg_rtype *a)
23 return gen_lsa(ctx, a->rd, a->rt, a->rs, a->sa);
26 static bool trans_DLSA(DisasContext *ctx, arg_rtype *a)
28 return gen_dlsa(ctx, a->rd, a->rt, a->rs, a->sa);
31 bool decode_isa_rel6(DisasContext *ctx, uint32_t insn)
33 if (TARGET_LONG_BITS == 64 && decode_mips64r6(ctx, insn)) {
34 return true;
36 return decode_mips32r6(ctx, insn);