From: "Takahashi, Chris" <chris.takaha...@fluke.com>
Reply-To: mspgcc-users@lists.sourceforge.net
To: "Mspgcc-Users (E-mail)" <mspgcc-users@lists.sourceforge.net>
Subject: [Mspgcc-users] Floating point Alternatives?
Date: Thu, 24 Jul 2003 09:44:13 -0700
Hi all,
I was wondering if there are any alternatives to the current FP functions
in
Libc? Looking at the code size for floating point functions in libc versus
the functions in IAR (1.26A) I get a considerable difference with gcc
coming
out almost 3 times larger with the libs that are imported. One example is
_fpmul_parts is 542 bytes (gcc) while ?F_MUL_L04 is 120 bytes (IAR). It is
my understanding that this is because GCC implements FP math with strict
attention to IEEE spec. This is good for some applications and Bad for
others. In our application ROM space is of utmost importance and as long
as
the math comes out to within a certain percent error it is fine. Is there
an alternative which would allow us to use smaller but possibly non IEEE
strict FP code?
The ADI compiler for their fixed-point DSPs uses an IEEE floating-point
emulation, which is very slow and requires a lot of code. The fixed-point
DSPs support a much more efficient floating-point format called two-word
floating point, with the exponent in one word and the mantissa in another.
The format is explained and assembler routines provided in document EE-185.
You might be able to implement something like that.
Leon
--
Leon Heller, G1HSM Tel: +44 1424 423947
Email:leon_hel...@hotmail.com
My web page: http://www.geocities.com/leon_heller
_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile