[Top][All Lists]

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

Re: [Tinycc-devel] Buggy left shift on x86_64

From: Vincent Lefevre
Subject: Re: [Tinycc-devel] Buggy left shift on x86_64
Date: Tue, 13 Mar 2012 17:02:24 +0100
User-agent: Mutt/1.5.21-6201-vl-r48020 (2011-12-20)

On 2012-03-13 16:49:37 +0100, Vincent Lefevre wrote:
> FYI, the problem occurs for shift counts from 32 to 63 (larger
> shift counts are invalid in C, since the variable is on 64 bits).

The bug disappears when I replace 1UL by: (unsigned long) 1

And the bug occurs with:

  m = (1UL << (SH/2)) * (1UL << (SH/2));

So, it seems that the problem is not the left shift, but the fact
that tcc does not regard 1UL as an unsigned long (64 bits).

Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

reply via email to

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