It looks true for float and double, see also long double which differs greatly
On Windows: 32 and 64 bit with cl sizeof(float) 4 sizeof(double) 8 sizeof(long double) 8 On Linux ARM32 (Rpi) sizeof(float) 4 sizeof(double) 8 sizeof(long double) 8 On Linux ARM64 sizeof(float) 4 sizeof(double) 8 sizeof(long double) 16 On Linux x64 [cjullien@hilbert ~]$ gcc -m32 foo.c -o foo && ./foo sizeof(float) 4 sizeof(double) 8 sizeof(long double) 12 [cjullien@hilbert ~]$ gcc -m64 foo.c -o foo && ./foo sizeof(float) 4 sizeof(double) 8 sizeof(long double) 16 -----Original Message----- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Giovanni Mascellani Sent: lundi 14 janvier 2019 11:09 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] TinyCC for bootstrapping (with patches) Hi, Il 13/01/19 19:37, Daniel Glöckner ha scritto: > I really like the idea of using a library to perform floating point > operations and I also like that you made it optional. Good! > But it looks like you made the assumption that long double is an > 80 bit floating point type. This is only true for x86-32. You have to > look at the LDOUBLE_SIZE macro to determine which of float64_t, > extFloat80_t, and float128_t to use (For x86-32 it is 12 instead of > 10 because of padding). I agree. As I said in my first email, for the moment the patch is Intel-specific (and actually i386-specific). I was asking for preliminary opinions, because if people immediately think that such a patch would never be accepted, then I would not bother generalizing it. BTW, it is correct to assume that for all architecture supported by tcc float and double are always 32 and 64 bits? Thanks, Giovanni. -- Giovanni Mascellani <g.mascell...@gmail.com> Postdoc researcher - Université Libre de Bruxelles _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel