Re: Fixed point support for GCC cross compiler

"thant" <adm@standarddeviance.com>
18 Aug 2006 01:11:45 -0400

          From comp.compilers

Related articles
Fixed point support for GCC cross compiler shafitvm@gmail.com (shafi) (2006-08-15)
Re: Fixed point support for GCC cross compiler englere_geo@yahoo.com (Eric) (2006-08-15)
Re: Fixed point support for GCC cross compiler ian@airs.com (Ian Lance Taylor) (2006-08-18)
Re: Fixed point support for GCC cross compiler mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-08-18)
Re: Fixed point support for GCC cross compiler adm@standarddeviance.com (thant) (2006-08-18)
Re: Fixed point support for GCC cross compiler gene.ressler@gmail.com (Gene) (2006-08-18)
Re: Fixed point support for GCC cross compiler englere_geo@yahoo.com (Eric) (2006-08-18)
Re: Fixed point support for GCC cross compiler jeffrey.kenton@comcast.net (Jeff Kenton) (2006-08-20)
| List of all articles for this month |

From: "thant" <adm@standarddeviance.com>
Newsgroups: comp.compilers
Date: 18 Aug 2006 01:11:45 -0400
Organization: http://groups.google.com
References: 06-08-083
Keywords: GCC, types
Posted-Date: 18 Aug 2006 01:11:45 EDT

shafi wrote:


[...]


> Someone told me that one can add support in two ways.
> 1. Include the support through the compiler (change the internals).
> 2. Outside the compiler, through a library. (library support)
>
> I am not sure which one to pursue. [...]


Do you have to add it to the compiler? I've built a C++ Fixed class
that overloads all the basic math operators. And my math library is
parameterized on type so that you can write code that uses fixed-point,
floating-point (or even arbitrary-precision) number types as needed.
And for switching on an application-wide basis I write code that uses a
"Real" type, which I typedef to "Fixed" or float, or double as the
platform demands.


Works just fine. Sorry I'm not in a position to share, but it wasn't
that tough if you know C++.


-thant



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.