[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 13/22] target-mips: add Compact Branches
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 13/22] target-mips: add Compact Branches |
Date: |
Wed, 11 Jun 2014 09:52:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 06/11/2014 08:19 AM, Leon Alrae wrote:
> + case OPC_BEQZC:
> + tcg_gen_setcondi_tl(TCG_COND_EQ, bcond, t0, 0);
> + break;
...
> + /* Compact branches don't have delay slot, thus generating branch here */
> + /* TODO: implement forbidden slot */
> + gen_branch(ctx, 4);
This is not what I meant by generating a branch directly.
I meant generating
tcg_gen_brcondi(TCG_COND_EQ, t0, 0, label)
instead of computing setcond into bcond and then branching off a comparison
against bcond.
Consider creating some sort of structure that defines a condition for the
translator, much like target-s390x does with struct DisasCompare or target-i386
does with struct CCPrepare.
That lets "old" branches set up a condition based off bcond, and your new
branches set up a condition based off the general registers (or brand new temps
in the case of BOVC/BNVC).
The ability to select the TCG compare op also allows you to avoid things like
the xor at the end of your BNVC computation.
r~
- Re: [Qemu-devel] [PATCH v2 06/22] target-mips: split decode_opc_special* into *_r6 and *_legacy, (continued)
- [Qemu-devel] [PATCH v2 07/22] target-mips: signal RI Exception on DSP and Loongson instructions, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 08/22] target-mips: move PREF, CACHE, LLD and SCD instructions, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 10/22] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 05/22] target-mips: extract decode_opc_special* from decode_opc, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 11/22] target-mips: Status.UX/SX/KX enable 32-bit address wrapping, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 09/22] target-mips: redefine Integer Multiply and Divide instructions, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 13/22] target-mips: add Compact Branches, Leon Alrae, 2014/06/11
- [Qemu-devel] [PATCH v2 12/22] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions, Leon Alrae, 2014/06/11
- Re: [Qemu-devel] [PATCH v2 12/22] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions, Aurelien Jarno, 2014/06/19
- [Qemu-devel] [PATCH v2 14/22] target-mips: add Addressing and PC-relative instructions, Leon Alrae, 2014/06/11