[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] target-tricore: Add instructions of RC opco
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] target-tricore: Add instructions of RC opcode format |
Date: |
Wed, 29 Oct 2014 19:56:12 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 10/29/2014 06:22 AM, Bastian Koppelmann wrote:
> + } else if (shift_count > 0) {
> + low = tcg_temp_new();
> + high = tcg_temp_new();
> +
> + tcg_gen_andi_tl(low, r1, 0xffff);
> + tcg_gen_andi_tl(high, r1, 0xffff0000);
> + tcg_gen_shli_tl(low, low, shift_count);
> + tcg_gen_shli_tl(ret, high, shift_count);
> + tcg_gen_deposit_tl(ret, ret, low, 0, 16);
You don't need to mask low here,
> +
> + tcg_temp_free(low);
> + tcg_temp_free(high);
> + } else {
> + low = tcg_temp_new();
> + high = tcg_temp_new();
> +
> + tcg_gen_ext16s_tl(low, r1);
> + tcg_gen_andi_tl(high, r1, 0xffff0000);
> + tcg_gen_sari_tl(low, low, -shift_count);
> + tcg_gen_sari_tl(ret, high, -shift_count);
> + tcg_gen_deposit_tl(ret, ret, low, 0, 16);
Or high here, since the deposit takes care of that, and you're shifting away
from the mask.
r~
- [Qemu-devel] [PATCH 0/5] Add TriCore BOL, BRC, BRN, BRR and RC instructions, Bastian Koppelmann, 2014/10/29
- [Qemu-devel] [PATCH 1/5] target-tricore: Add instructions of BOL opcode format, Bastian Koppelmann, 2014/10/29
- [Qemu-devel] [PATCH 2/5] target-tricore: Add instructions of BRC opcode format, Bastian Koppelmann, 2014/10/29
- [Qemu-devel] [PATCH 3/5] target-tricore: Add instructions of BRN opcode format, Bastian Koppelmann, 2014/10/29
- [Qemu-devel] [PATCH 5/5] target-tricore: Add instructions of RC opcode format, Bastian Koppelmann, 2014/10/29
- Re: [Qemu-devel] [PATCH 5/5] target-tricore: Add instructions of RC opcode format,
Richard Henderson <=
- [Qemu-devel] [PATCH 4/5] target-tricore: Add instructions of BRR opcode format, Bastian Koppelmann, 2014/10/29