[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 2/5] Implement i.MX31 Clock Control Module
From: |
Peter Chubb |
Subject: |
Re: [Qemu-devel] [PATCH v6 2/5] Implement i.MX31 Clock Control Module |
Date: |
Tue, 24 Apr 2012 17:04:52 +1000 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
>>>>> "Paolo" == Paolo Bonzini <address@hidden> writes:
Paolo> Il 23/04/2012 22:54, Peter Chubb ha scritto:
Peter> What is this calculation supposed to do? It doesn't convert a
Peter> 10-bit signed twos-complement number into an int32_t, unless
Peter> I'm confused... Also, it's a rather opaque way to write "mfn &=
Peter> 0x200;".
>>
>> I'll use a different way to calculate. Maybe:
>> mfn <<= (32-10);
>> mfn >= (32-10);
Paolo> The magic that you wanted is
Paolo> mfn |= -(mfn & 0x200);
Yes. I'd actually been thinking of mfn -= 2 * (mfn & 0x200);
but forgot the 2*. But the shifts should be faster, and that's wjhat
I'm testing at the moment.
Peter C
--
Dr Peter Chubb peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA
[Qemu-devel] [PATCH v6 1/5] i.MX UART support, Peter Chubb, 2012/04/22
[Qemu-devel] [PATCH v6 3/5] FreeSCALE i.MX31 support: Timers, Peter Chubb, 2012/04/22
[Qemu-devel] [PATCH v6 4/5] FreeSCALE i.MX31 support: AVIC, Peter Chubb, 2012/04/22
Re: [Qemu-devel] [PATCH v6 0/5] FreeSCALE i.MX31 support, Andreas Färber, 2012/04/24