[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/35] target/mips: Add nanoMIPS pool32a0 instru
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 11/35] target/mips: Add nanoMIPS pool32a0 instructions |
Date: |
Sun, 24 Jun 2018 16:59:49 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/20/2018 05:05 AM, Yongbok Kim wrote:
> + case NM_SOV:
> + {
> + TCGv t0 = tcg_temp_local_new();
> + TCGv t1 = tcg_temp_new();
> + TCGv t2 = tcg_temp_new();
> + TCGLabel *l1 = gen_new_label();
> +
> + gen_load_gpr(t1, rs);
> + gen_load_gpr(t2, rt);
> + tcg_gen_add_tl(t0, t1, t2);
> + tcg_gen_ext32s_tl(t0, t0);
> + tcg_gen_xor_tl(t1, t1, t2);
> + tcg_gen_xor_tl(t2, t0, t2);
> + tcg_gen_andc_tl(t1, t2, t1);
> +
> + tcg_gen_movi_tl(t0, 0);
> + tcg_gen_brcondi_tl(TCG_COND_GE, t1, 0, l1);
> + /* operands of same sign, result different sign */
> +
> + tcg_gen_movi_tl(t0, 1);
> + gen_set_label(l1);
> + gen_store_gpr(t0, rd);
No need for branch. This is just extracting the sign bit, so
tcg_gen_shri_tl(t0, t1, TARGET_LONG_BITS - 1);
r~
- [Qemu-devel] [PATCH 06/35] target/mips: Add nanoMIPS pool16c instructions, (continued)
- [Qemu-devel] [PATCH 06/35] target/mips: Add nanoMIPS pool16c instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 07/35] target/mips: Add nanoMIPS save and restore, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 08/35] target/mips: Add nanoMIPS 32bit instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 09/35] target/mips: Add nanoMIPS 48bit instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 10/35] target/mips: Add nanoMIPS pool32f instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 11/35] target/mips: Add nanoMIPS pool32a0 instructions, Yongbok Kim, 2018/06/20
- Re: [Qemu-devel] [PATCH 11/35] target/mips: Add nanoMIPS pool32a0 instructions,
Richard Henderson <=
- [Qemu-devel] [PATCH 12/35] target/mips: Add nanoMIPS pool32axf instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 13/35] target/mips: Update gen_flt_ldst(), Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 14/35] target/mips: Add nanoMIPS p_lsx instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 15/35] target/mips: Implement nanoMIPS EXTW instruction, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 16/35] target/mips: Add has_isa_mode, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 17/35] target/mips: Add nanoMIPS load store instructions, Yongbok Kim, 2018/06/20
- [Qemu-devel] [PATCH 18/35] target/mips: Add nanoMIPS branch instructions, Yongbok Kim, 2018/06/20