tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Fwd: Bug#698351: tcc: FE_INVALID flag not set on comp


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Fwd: Bug#698351: tcc: FE_INVALID flag not set on comparison with NAN (unordered)
Date: Fri, 03 Jan 2014 10:30:15 +0800
User-agent: KMail/4.11.3 (Linux/2.6.38-ac2-ac100; KDE/4.11.3; armv7l; ; )

Le jeudi 17 janvier 2013, 16:18:04 Vincent Lefevre a écrit :
> Hi,

Hi Vincent,

> 
> I've quickly looked at the source, but I'm not sure (I know almost
> nothing about x86 / x86_64). One important point is that the
> FE_INVALID flag must not be set for == and !=, and it seems that
> the current code is shared by all these operations. I suppose that
> a test op == TOK_EQ || op == TOK_NE could be sufficient to select
> the right instruction.

You were right, gen_opf share the same code for all comparison so I added a 
test as you suggested. I tried with your little program on a Debian amd64 
porterbox and now there is one thing tcc does better than gcc (at least the 
version I tried). So I pushed the change as well as a fix in 
classify_x86_64_arg to decide how a parameter should be passed at function 
call. I discovered the bug thanks to your program.

There is quite a few differences in the output about -0.0 where gcc uses 0.0. 
I'm not sure it's worth doing anything to change that since it's not a bug but 
less divergence with gcc (and probably clang) could be good. If it's just a 
few lines to add, why not. I might take a look later this month, or never. ;)

So thanks a lot for the bug report and please yell if I did something wrong.

Best regards,

Thomas



reply via email to

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