[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 31/38] target-microblaze: Simplify address co
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v3 31/38] target-microblaze: Simplify address computation using tcg_gen_addi_i32() |
Date: |
Thu, 17 May 2018 15:19:06 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/16/2018 03:51 PM, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <address@hidden>
>
> Simplify address computation using tcg_gen_addi_i32().
> tcg_gen_addi_i32() already optimizes the case when the
> immediate is zero.
>
> No functional change.
>
> Suggested-by: Richard Henderson <address@hidden>
> Reviewed-by: Richard Henderson <address@hidden>
> Signed-off-by: Edgar E. Iglesias <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> target/microblaze/translate.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
> index 39c4d0654e..44395cf189 100644
> --- a/target/microblaze/translate.c
> +++ b/target/microblaze/translate.c
> @@ -899,12 +899,7 @@ static inline void compute_ldst_addr(DisasContext *dc,
> bool ea, TCGv t)
> /* Immediate. */
> t32 = tcg_temp_new_i32();
> if (!extimm) {
> - if (dc->imm == 0) {
> - tcg_gen_mov_i32(t32, cpu_R[dc->ra]);
> - } else {
> - tcg_gen_movi_i32(t32, (int32_t)((int16_t)dc->imm));
> - tcg_gen_add_i32(t32, cpu_R[dc->ra], t32);
> - }
> + tcg_gen_addi_i32(t32, cpu_R[dc->ra], (int16_t)dc->imm);
> } else {
> tcg_gen_add_i32(t32, cpu_R[dc->ra], *(dec_alu_op_b(dc)));
> }
>
- [Qemu-devel] [PATCH v3 27/38] target-microblaze: mmu: Add a configurable output address mask, (continued)
- [Qemu-devel] [PATCH v3 27/38] target-microblaze: mmu: Add a configurable output address mask, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 28/38] target-microblaze: dec_msr: Plug a temp leak, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 30/38] target-microblaze: Allow address sizes between 32 and 64 bits, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 32/38] target-microblaze: mmu: Cleanup debug log messages, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 33/38] target-microblaze: Use table based condition-codes conversion, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 29/38] target-microblaze: Add support for extended access to TLBLO, Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 31/38] target-microblaze: Simplify address computation using tcg_gen_addi_i32(), Edgar E. Iglesias, 2018/05/16
- Re: [Qemu-devel] [PATCH v3 31/38] target-microblaze: Simplify address computation using tcg_gen_addi_i32(),
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v3 34/38] target-microblaze: Remove argument b in eval_cc(), Edgar E. Iglesias, 2018/05/16
- [Qemu-devel] [PATCH v3 36/38] target-microblaze: Use tcg_gen_movcond in eval_cond_jmp, Edgar E. Iglesias, 2018/05/16
- Re: [Qemu-devel] [PATCH v3 36/38] target-microblaze: Use tcg_gen_movcond in eval_cond_jmp, Richard Henderson, 2018/05/17
[Qemu-devel] [PATCH v3 38/38] target-microblaze: Consolidate MMU enabled checks, Edgar E. Iglesias, 2018/05/16