From mint-bounce@lists.fishpool.fi Tue Feb 26 06:26:28 2008 Message-ID: <47C3F583.2030907@freesbee.fr> Date: Tue, 26 Feb 2008 12:18:27 +0100 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: mint Subject: Re: [MiNT] Newest GCC + Binutils compile status References: <47BEF24F.4040003@gmail.com> <47C08695.4080505@gmail.com> <47C0A9A6.2060505@freesbee.fr> <47C31AE7.5000500@gmail.com> In-Reply-To: <47C31AE7.5000500@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id m1QBQST6009663 MiKRO wrote: > I took a look into netbsd's libm -- it's based on fdlibm as you guessed > but it's made much more intelligent than sparemint's one. on netbsd > there are three targets, m68k, m68881 and m68060 and each target > contains math functions for each FPU -- i.e. m68k has none, so > everything is built (emulated functions in C), m68881 has sin function > so it's just wrapper to fsin instruction, m68060 hasn't sinf but it's > wrapped to 060 FPSP by motorola. Good ! Note that GCC itself has the notion of "builtin functions". For some well-known functions (including math), GCC do not actually call the functions, it simply replaces the well-known function call by the precomputed result. When the function arguments are not constant, and when it is possible, GCC tries to replace the function call with an FPU call (for example, fabs() inside libm.a is never called, the FPU instuction "fabs" is always used instead). A similar optimization occurs with printf("foo\n"). GCC actually calls puts("foo") ! -- Vincent Rivière