aboutsummaryrefslogtreecommitdiff
path: root/target/rx
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-10-19 11:21:40 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-10-22 16:43:53 -0700
commit0d67249c6d30a626434815c4fc39ab6bc60708f6 (patch)
tree6afe1e9caea4c6d81c29a8e6bcef61364f2b4c6b /target/rx
parent443025e4d0f71bb82fe80369032bf1a04f433352 (diff)
downloadqemu-0d67249c6d30a626434815c4fc39ab6bc60708f6.zip
qemu-0d67249c6d30a626434815c4fc39ab6bc60708f6.tar.gz
qemu-0d67249c6d30a626434815c4fc39ab6bc60708f6.tar.bz2
target/rx: Use tcg_gen_ext_i32
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/rx')
-rw-r--r--target/rx/translate.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/target/rx/translate.c b/target/rx/translate.c
index f886083..c6ce717 100644
--- a/target/rx/translate.c
+++ b/target/rx/translate.c
@@ -492,13 +492,11 @@ static bool trans_MOV_ra(DisasContext *ctx, arg_MOV_ra *a)
/* mov.<bwl> rs,rd */
static bool trans_MOV_mm(DisasContext *ctx, arg_MOV_mm *a)
{
- static void (* const mov[])(TCGv ret, TCGv arg) = {
- tcg_gen_ext8s_i32, tcg_gen_ext16s_i32, tcg_gen_mov_i32,
- };
TCGv tmp, mem, addr;
+
if (a->lds == 3 && a->ldd == 3) {
/* mov.<bwl> rs,rd */
- mov[a->sz](cpu_regs[a->rd], cpu_regs[a->rs]);
+ tcg_gen_ext_i32(cpu_regs[a->rd], cpu_regs[a->rs], a->sz | MO_SIGN);
return true;
}
@@ -570,10 +568,7 @@ static bool trans_MOVU_mr(DisasContext *ctx, arg_MOVU_mr *a)
/* movu.<bw> rs,rd */
static bool trans_MOVU_rr(DisasContext *ctx, arg_MOVU_rr *a)
{
- static void (* const ext[])(TCGv ret, TCGv arg) = {
- tcg_gen_ext8u_i32, tcg_gen_ext16u_i32,
- };
- ext[a->sz](cpu_regs[a->rd], cpu_regs[a->rs]);
+ tcg_gen_ext_i32(cpu_regs[a->rd], cpu_regs[a->rs], a->sz);
return true;
}