qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-lm32: Use new qemu_ld/st opcodes
Date: Thu, 12 Dec 2013 23:18:59 +0100	[thread overview]
Message-ID: <201312122318.59660.michael@walle.cc> (raw)
In-Reply-To: <1386381801-30251-1-git-send-email-rth@twiddle.net>


Hi Richard,

Am Samstag, 7. Dezember 2013, 03:03:21 schrieb Richard Henderson:
> Cc: Michael Walle <michael@walle.cc>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  target-lm32/translate.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/target-lm32/translate.c b/target-lm32/translate.c
> index 6ea0ecd..3d2f2e8 100644
> --- a/target-lm32/translate.c
> +++ b/target-lm32/translate.c
> @@ -441,7 +441,7 @@ static void dec_lb(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_ld8s(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_ld_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_SB);
>      tcg_temp_free(t0);
>  }
> 
> @@ -453,7 +453,7 @@ static void dec_lbu(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_ld8u(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_ld_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_UB);
>      tcg_temp_free(t0);
>  }
> 
> @@ -465,7 +465,7 @@ static void dec_lh(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_ld16s(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_ld_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_TESW);
>      tcg_temp_free(t0);
>  }
> 
> @@ -477,7 +477,7 @@ static void dec_lhu(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_ld16u(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_ld_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_TEUW);
>      tcg_temp_free(t0);
>  }
> 
> @@ -489,7 +489,7 @@ static void dec_lw(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_ld32s(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_ld_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_TEUL);

shouldn't this be MO_TESL?

>      tcg_temp_free(t0);
>  }
> 
> @@ -663,7 +663,7 @@ static void dec_sb(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_st8(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_st_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_UB);
>      tcg_temp_free(t0);
>  }
> 
> @@ -697,7 +697,7 @@ static void dec_sh(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_st16(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_st_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_TEUW);
>      tcg_temp_free(t0);
>  }
> 
> @@ -794,7 +794,7 @@ static void dec_sw(DisasContext *dc)
> 
>      t0 = tcg_temp_new();
>      tcg_gen_addi_tl(t0, cpu_R[dc->r0], sign_extend(dc->imm16, 16));
> -    tcg_gen_qemu_st32(cpu_R[dc->r1], t0, MEM_INDEX);
> +    tcg_gen_qemu_st_tl(cpu_R[dc->r1], t0, MEM_INDEX, MO_TEUL);
>      tcg_temp_free(t0);
>  }


-michael

      reply	other threads:[~2013-12-12 22:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07  2:03 [Qemu-devel] [PATCH] target-lm32: Use new qemu_ld/st opcodes Richard Henderson
2013-12-12 22:18 ` Michael Walle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201312122318.59660.michael@walle.cc \
    --to=michael@walle.cc \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).