2 * Address Computation and Large Constant Instructions
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) 2009 CodeSourcery (MIPS16 and microMIPS support)
8 * Copyright (c) 2012 Jia Liu & Dongxue Zhang (MIPS ASE DSP support)
9 * Copyright (c) 2020 Philippe Mathieu-Daudé
11 * SPDX-License-Identifier: LGPL-2.1-or-later
13 #include "qemu/osdep.h"
14 #include "tcg/tcg-op.h"
15 #include "translate.h"
17 bool gen_lsa(DisasContext
*ctx
, int rd
, int rt
, int rs
, int sa
)
30 tcg_gen_shli_tl(t0
, t0
, sa
+ 1);
31 tcg_gen_add_tl(cpu_gpr
[rd
], t0
, t1
);
32 tcg_gen_ext32s_tl(cpu_gpr
[rd
], cpu_gpr
[rd
]);
40 bool gen_dlsa(DisasContext
*ctx
, int rd
, int rt
, int rs
, int sa
)
55 tcg_gen_shli_tl(t0
, t0
, sa
+ 1);
56 tcg_gen_add_tl(cpu_gpr
[rd
], t0
, t1
);