[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/13] target-arm: A64: add support for conditio
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 01/13] target-arm: A64: add support for conditional select |
Date: |
Sat, 07 Dec 2013 05:44:22 +1300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 12/07/2013 01:45 AM, Peter Maydell wrote:
> On 5 December 2013 22:26, Richard Henderson <address@hidden> wrote:
>> On 12/06/2013 10:51 AM, Peter Maydell wrote:
>>> + if (cond >= 0x0e) { /* condition "always" */
>>> + tcg_src = read_cpu_reg(s, rn, sf);
>>> + tcg_gen_mov_i64(tcg_rd, tcg_src);
>>
>> I wonder if it's worth adding that 0x0[ef] case to the generic condition
>> processing rather than keep replicating it everywhere.
>
> I think "always true" is a special case anyway because you don't
> want to emit any kind of branching/label logic at all.
Sure, but unlike unconditional branches, which are useful to special-case, one
sort of expects never to see an unconditional conditional move. Given
TCG_COND_ALWAYS, we can re-use generic logic and have things fall out
relatively easily.
> I had a think about this and I couldn't really come up with a particularly
> nice looking API for it, given the way that movcondi/setcondi/brcondi work.
> The best I could come up with was something like:
The s390 target has an example with DisasCompare and disas_jcc.
The i386 target has another example with CCPrepare and gen_prepare_cc.
The i386 port uses similar flags to ARM, but represents them differently. I
suppose good ideas could be taken from either port.
> So I definitely think I'd rather postpone this for now, unless you have
> a neat idea that I've missed for making it look nice.
Let's just postpone for now.
r~
- Re: [Qemu-devel] [PATCH 10/13] target-arm: A64: add support for bitfield insns, (continued)
[Qemu-devel] [PATCH 11/13] host-utils: add clrsb32/64 - count leading redundant sign bits, Peter Maydell, 2013/12/05
[Qemu-devel] [PATCH 07/13] target-arm: A64: add support for 1-src data processing and CLZ, Peter Maydell, 2013/12/05
[Qemu-devel] [PATCH 05/13] target-arm: A64: add support for 2-src data processing and DIV, Peter Maydell, 2013/12/05