qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integ


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer
Date: Sun, 02 Jun 2013 21:52:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 02/06/2013 16:50, Peter Maydell ha scritto:
> On 2 June 2013 15:36, Paolo Bonzini <address@hidden> wrote:
>> This should work:
>>
>>     int64_t h;
>>     if (!n) {
>>         return a;
>>     }
>>     h = a.hi >> n;
> 
> This is undefined for n >= 64.

Yes, it has to be a.hi >> (n & 63).

> I would suggest looking at fpu/softfloat-macros.h:shift128Right()
> except that that has at least one clearly dubious thing in it
> (a check for "count < 64" in an else case that can't be reached
> if count < 64)...

It's a bit different in that I want an arithmetic right shift.

Paolo



reply via email to

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