[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4 |
Date: |
Tue, 22 Dec 2009 00:08:35 +0100 |
On Mon, Dec 21, 2009 at 11:50 PM, Richard Henderson <address@hidden> wrote:
[...]
>> Even if movcond was quick to generate
>> host code, for instance for ARM, you'd have to explicitly detect
>> conditional moves
>
> One of us is confused. Why would I have to explicitly detect conditional
> moves?
Most ARM instructions are conditional, with condition code being the
top 4 bits of the instruction. So the front-end does it the simplest
way possible:
if (cond != 0xe) {
/* if not always execute, we generate a conditional jump to
next instruction */
s->condlabel = gen_new_label();
gen_test_cc(cond ^ 1, s->condlabel);
s->condjmp = 1;
}
and then generates the code for the instruction as if it wasn't
conditional. If you wanted to use movcond, you'd have to make
cond + move a special case, which would add some cost to
all conditional instructions. OTOH that cost could be amortized
by generating less TCG ops for that instruction, and by a
potentially faster generated code. But if this isn't measured I
won't bet which one is faster, I have been wrong too often.
Laurent
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, (continued)
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Paul Brook, 2009/12/20
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Richard Henderson, 2009/12/20
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Richard Henderson, 2009/12/21
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Laurent Desnogues, 2009/12/21
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Richard Henderson, 2009/12/21
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4,
Laurent Desnogues <=
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Richard Henderson, 2009/12/21
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Laurent Desnogues, 2009/12/22
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Laurent Desnogues, 2009/12/23
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Aurelien Jarno, 2009/12/22
- Re: [Qemu-devel] [PATCH 0/5] tcg conditional set, round 4, Aurelien Jarno, 2009/12/21