xref: /openbmc/qemu/target/mips/tcg/rel6_translate.c (revision ce799a04)
1 /*
2  *  MIPS emulation for QEMU - Release 6 translation routines
3  *
4  *  Copyright (c) 2020 Philippe Mathieu-Daudé
5  *
6  * SPDX-License-Identifier: LGPL-2.1-or-later
7  *
8  * This code is licensed under the LGPL v2.1 or later.
9  */
10 
11 #include "qemu/osdep.h"
12 #include "translate.h"
13 
14 /* Include the auto-generated decoders.  */
15 #include "decode-rel6.c.inc"
16 
17 bool trans_REMOVED(DisasContext *ctx, arg_REMOVED *a)
18 {
19     gen_reserved_instruction(ctx);
20 
21     return true;
22 }
23 
24 static bool trans_LSA(DisasContext *ctx, arg_r *a)
25 {
26     return gen_lsa(ctx, a->rd, a->rt, a->rs, a->sa);
27 }
28 
29 static bool trans_DLSA(DisasContext *ctx, arg_r *a)
30 {
31     if (TARGET_LONG_BITS != 64) {
32         return false;
33     }
34     return gen_dlsa(ctx, a->rd, a->rt, a->rs, a->sa);
35 }
36