harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: a quick question for signed shift right for long type
Date Thu, 10 Jul 2008 09:53:42 GMT
Hi, Xiaoming!

Can you provide the exact test case?
It's not obvious what do you try to say.

Thanks,
Aleksey.

On Thu, Jul 10, 2008 at 1:36 PM, xiaoming gu <xiaoming.gu@gmail.com> wrote:
> Hi, all. I just got a problem with signed shift right problem.
>
> long a = 0x8000000000000000;
> long b = a>>63; // b is 0xffffffffffffffff
>
> But if I use SAR to do the signed shift right in harmony internally, b is
> 0xffffffff00000001.
> I traced the code for a while and couldn't find the difference for the two
> ways.
>
> Any idea? Thanks.
>
> Xiaoming
>

Mime
View raw message