[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-m68k: Implement bfffo
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] target-m68k: Implement bfffo |
Date: |
Tue, 15 Nov 2016 22:33:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
Le 15/11/2016 à 22:21, Richard Henderson a écrit :
> On 11/15/2016 10:07 PM, Laurent Vivier wrote:
>> Le 15/11/2016 à 21:44, Richard Henderson a écrit :
>>> Signed-off-by: Richard Henderson <address@hidden>
>>> ---
>>>
>>> I've started a glibc test run with this, but I don't expect overmuch.
>>> The only applications I can see are "bfffo *,0,32,dN" which isn't
>>> exactly exhaustive. Probably better to hand craft some tests vs real
>>> hardware.
>>>
>>> Considering the prevelance of small helper functions calling ctz/clz,
>>> I'm thinking of adding an opcode to tcg for this. Certainly all of
>>> the common hosts support it natively...
>>
>> I've booted an etch-m68k container with patch and it works.
>
> Thanks.
>
>>> @@ -3943,11 +3960,17 @@ DISAS_INSN(bfop_reg)
>>> tcg_gen_rotl_i32(QREG_CC_N, src, tmp);
>>> tcg_gen_andc_i32(QREG_CC_N, QREG_CC_N, mask);
>>> tcg_gen_rotr_i32(mask, mask, tmp);
>>> + if (!TCGV_IS_UNUSED(tofs)) {
>>> + tcg_gen_mov_tl(tofs, tmp);
>>
>> _tl suffix is never used with m68k, should we?
>>
>
> Gah. Typing habit from other targets.
>
> I don't think there's any point in using _tl for m68k, as there will
> never be a 64-bit version. If you could fix that as you apply to your
> tree, that would be great.
I'm going to add the three bitfield patches to the m68k-for-2.9 branch,
fixing this.
Thanks,
Laurent