Patchwork target-i386: Remove redundant word mask in port out instructions

login
register
mail settings
Submitter Jan Kiszka
Date Sept. 26, 2011, 5:20 p.m.
Message ID <4E80B440.7040000@siemens.com>
Download mbox | patch
Permalink /patch/116459/
State New
Headers show

Comments

Jan Kiszka - Sept. 26, 2011, 5:20 p.m.
T0 was already masked to 16 bits when loading it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 target-i386/translate.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Richard Henderson - Sept. 27, 2011, 3:20 p.m.
On 09/26/2011 10:20 AM, Jan Kiszka wrote:
> T0 was already masked to 16 bits when loading it.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~
Blue Swirl - Oct. 1, 2011, 12:05 p.m.
Thanks, applied.

On Mon, Sep 26, 2011 at 5:20 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> T0 was already masked to 16 bits when loading it.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  target-i386/translate.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/target-i386/translate.c b/target-i386/translate.c
> index b894e97..1ef8d16 100644
> --- a/target-i386/translate.c
> +++ b/target-i386/translate.c
> @@ -6116,7 +6116,6 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
>         if (use_icount)
>             gen_io_start();
>         tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
> -        tcg_gen_andi_i32(cpu_tmp2_i32, cpu_tmp2_i32, 0xffff);
>         tcg_gen_trunc_tl_i32(cpu_tmp3_i32, cpu_T[1]);
>         gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
>         if (use_icount) {
> @@ -6159,7 +6158,6 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
>         if (use_icount)
>             gen_io_start();
>         tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
> -        tcg_gen_andi_i32(cpu_tmp2_i32, cpu_tmp2_i32, 0xffff);
>         tcg_gen_trunc_tl_i32(cpu_tmp3_i32, cpu_T[1]);
>         gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
>         if (use_icount) {
> --
> 1.7.3.4
>

Patch

diff --git a/target-i386/translate.c b/target-i386/translate.c
index b894e97..1ef8d16 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -6116,7 +6116,6 @@  static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
         if (use_icount)
             gen_io_start();
         tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
-        tcg_gen_andi_i32(cpu_tmp2_i32, cpu_tmp2_i32, 0xffff);
         tcg_gen_trunc_tl_i32(cpu_tmp3_i32, cpu_T[1]);
         gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
         if (use_icount) {
@@ -6159,7 +6158,6 @@  static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
         if (use_icount)
             gen_io_start();
         tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
-        tcg_gen_andi_i32(cpu_tmp2_i32, cpu_tmp2_i32, 0xffff);
         tcg_gen_trunc_tl_i32(cpu_tmp3_i32, cpu_T[1]);
         gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
         if (use_icount) {