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

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to