|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v6 2/5] Implement i.MX31 Clock Control Module |
Date: | Tue, 24 Apr 2012 08:58:00 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
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); The magic that you wanted is mfn |= -(mfn & 0x200); :) but I do prefer the shifts too. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |