tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TinyCC for bootstrapping (with patches)


From: Michael Matz
Subject: Re: [Tinycc-devel] TinyCC for bootstrapping (with patches)
Date: Mon, 21 Jan 2019 18:24:58 +0000 (UTC)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Sun, 13 Jan 2019, Giovanni Mascellani wrote:

> 2) I patched TinyCC so that it can be built by a compiler that does not
> support floating point numbers (as is the case for the C compiler in
> asmc that builds TinyCC). Basically I import in the TinyCC repository
> the code from the Berkeley SoftFloat library[3] and replace each
> operation between floating point numbers with the corresponding call to
> SoftFloat. SoftFloat is licensed under a permissive BSD-style license,
> so it should pose no problems to be linked with TinyCC. I also had to
> take some code from musl (mainly to implement strtod and variants),
> which is licensed under a MIT license.
> 
>  [3] http://www.jhauser.us/arithmetic/SoftFloat.html
> 
> In its current form the SoftFloat patch is totally not acceptable for
> inclusion in mob. It is quite messy and I doubt it works properly for
> non-Intel architectures. However, before fixing it up I would like to
> know what is your opinion on including this feature in TinyCC. If would
> definitely bring in a lot of new code, which might be against the KISS
> philosophy that TinyCC has.

Hmm, I wouldn't support including softfloat as is in the tcc repo (the 
historic messiness of BSD softfloat only being one reason; 
size and anti-KISS being others).

I would support changing tcc such that it's possible to use it as 
external(!) optional dependency.  You could also make the constant folding 
for float types conditional on ifdefs.  That would leave only the 
load/stores of float types and the dreaded string-to-float conversions.

> Thanks for reading and for working on TinyCC, and please let me know 
> what you think of my patches.


Ciao,
Michael.



reply via email to

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