qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user
Date: Fri, 17 Jun 2016 20:04:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


On 16/06/2016 21:07, Richard Henderson wrote:
>>              && ((addr >> 41) & 3) == 2
>> -            && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63);
>> +            && addr >> TARGET_VIRT_ADDR_SPACE_BITS == 1);

What you want here is

+               addr >> TARGET_VIRT_ADDR_SPACE_BITS == -1

since that's what addr >> 63 is.  With this change the patch should be fine.

Alternatively, combining this condition with addr < 0 should be

        (uint64_t)addr >= (-1ull << TARGET_VIRT_ADDR_SPACE_BITS)

I think (I might have an off by one here, sorry).  If you go this way,
it's of course nicer to change the argument type to uint64_t.

Paolo



reply via email to

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