qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 17/21] target-arm: A64: add support for conditio


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 17/21] target-arm: A64: add support for conditional compare insns
Date: Thu, 19 Dec 2013 21:23:38 +0000

On 19 December 2013 21:04, Richard Henderson <address@hidden> wrote:
> On 12/17/2013 07:12 AM, Peter Maydell wrote:
>
>> +    tcg_tmp = tcg_temp_new_i64();
>> +
>> +    if (cond < 0x0e) { /* not always */
>> +        int label_match = gen_new_label();
>> +        label_continue = gen_new_label();
>> +        arm_gen_test_cc(cond, label_match);
>> +        /* nomatch: */
>> +        tcg_gen_movi_i64(tcg_tmp, nzcv << 28);
>> +        gen_set_nzcv(tcg_tmp);
>> +        tcg_gen_br(label_continue);
>> +        gen_set_label(label_match);
>> +    }
>
> You can't re-use tcg_tmp across basic blocks like this.

Hmm. I clearly don't entirely understand the rules here.
The TCG README says "temporaries are only live
in a basic block" and "After the end of a basic block, the
content of temporaries is destroyed", which I took to
mean that the value in the temp was dead after the
branch, but that I could freely reuse it for something
else afterwards as long as I wrote a new value to
it (as we're doing here). I guess that's wrong?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]