tinycc-devel
[Top][All Lists]
Advanced

[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 16:49:37 +0100
User-agent: Mutt/1.5.21-6201-vl-r48020 (2011-12-20)

On 2012-03-13 16:20:21 +0100, Thomas Preud'homme wrote:
> I'm pretty busy these days but I will look into it as soon as possible.
> 
> I've checked that it is not Debian specific: the same error happen
> with the code from mob branch. Anyway, the only x86-64 change done
> compared to the raw tcc[debian-patch] is a cherry-pick of the patch
> to fix loading of LLOCAL floats. So if anyone want to jump into it,
> feel free :)

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).

Now, my knowledge on the x86_64 instruction set the its encoding
is nonexistent.

For the non-constant case without optimizations, I can see that gcc
generates

        salq    %cl, %rbx

in every case and doesn't seem to make a difference between shift
counts up to 31 and those above.

-- 
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]