[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-ppc] TCG and branches
From: |
Nikunj A Dadhania |
Subject: |
Re: [Qemu-devel] [Qemu-ppc] TCG and branches |
Date: |
Sun, 31 Jul 2016 23:55:52 +0530 |
User-agent: |
Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu) |
Benjamin Herrenschmidt <address@hidden> writes:
> Hi Richard !
>
> So in my discovery of TCG, one thing I noticed is the horrendous amount
> of code generated for branches, especially conditional ones.
>
static inline void gen_bcond(DisasContext *ctx, int type)
{
[...]
if ((bo & 0x4) == 0) {
/* Decrement and test CTR */
[...]
if (bo & 0x2) {
tcg_gen_brcondi_tl(TCG_COND_NE, temp, 0, l1);
} else {
tcg_gen_brcondi_tl(TCG_COND_EQ, temp, 0, l1);
}
BUG, both jumping to same label?
Can we replace it unconditionally with
tcg_gen_br(l1) ?
Regards
Nikunj