qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 36/47] target/ppc: Implement xvtlsbb instruction


From: Richard Henderson
Subject: Re: [PATCH v4 36/47] target/ppc: Implement xvtlsbb instruction
Date: Tue, 22 Feb 2022 14:07:21 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 2/22/22 04:36, matheus.ferst@eldorado.org.br wrote:
+        tcg_gen_and_i64(tmp, mask, xb);
+        tcg_gen_movcond_i64(TCG_COND_EQ, all_true, tmp,
+                            mask, all_true, zero);
+
+        tcg_gen_andc_i64(tmp, mask, xb);
+        tcg_gen_movcond_i64(TCG_COND_EQ, all_false, tmp,
+                            mask, all_false, zero);

I would unroll this and use fewer conditions.

    t0 = mask & xb[0]
    t1 = mask & xb[1]

    o2 = t0 | t1
    a2 = t0 & t1

    o2 = (o2 == 0) << 1
    a2 = (a2 == mask) << 3
    crf = o2 | a2


r~



reply via email to

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