[Top][All Lists]

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

Re: [Tinycc-devel] Regarding Long double Constant

From: Vincent Lefevre
Subject: Re: [Tinycc-devel] Regarding Long double Constant
Date: Thu, 11 Feb 2021 10:20:17 +0100
User-agent: Mutt/2.0.5+111 (106ff19a) vl-132933 (2021-02-08)

On 2021-02-11 09:27:30 +0100, Ayush Varshney wrote:

> *Long double constant problem* is for storing the value of 0.0, tcc
> stores 0.0 in memory as long double value but long double value in
> tcc takes only 10 bytes but the source code stores 0.0 value in 12
> bytes. The extra two bytes creates variations in the output. The
> problem is solved using (f1-f1) instead of 0.0, it is semantically
> same and produces the same output. For example, Instead of
> ‘if(f2==0.0)’ use ‘if(f2==f1-f1)’
> I have pushed my solution
> <https://repo.or.cz/tinycc.git/commit/405aef9155fb66e280dac82ce521d5d2ea06f2ab>
> and please let me know if you have any queries regarding it.

I don't understand. You just modify the tcc code. So you are just
complaining that the compiler used to compile tcc does not optimize.
The solution would be to fix this compiler.

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://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]