This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fixed-Point Arithmetic Project
- From: "Chao-ying Fu" <fu at mips dot com>
- To: "Duncan Sands" <duncan dot sands at math dot u-psud dot fr>, "Robert Dewar" <dewar at adacore dot com>
- Cc: <gcc at gcc dot gnu dot org>, "Thekkath, Radhika" <radhika at mips dot com>, "Stephens, Nigel" <nigel at mips dot com>, "Arnaud Charlet" <charlet at adacore dot com>
- Date: Wed, 4 Oct 2006 11:08:45 -0700
- Subject: Re: Fixed-Point Arithmetic Project
- References: <3CB54817FDF733459B230DD27C690CEC012BB135@Exchange.mips.com> <200609220924.28577.duncan.sands@math.u-psud.fr> <45154DD4.2020302@adacore.com> <200610041219.39177.duncan.sands@math.u-psud.fr>
- Reply-to: "Chao-ying Fu" <fu at mips dot com>
Hello,
The supported fixed data types are "fixed" in the Embedded-C spec.
Depending on targets, the numbers of integer/fractional
data bits cannot be changed after configuration. Also, there are no
decimal fixed-point types.
Ex:
1. HQ is a signed 16-bit fractional data type, and the MIPS backend
will configure 15-bit fractional bits and no integer bits.
2. SQ is a signed 32-bit fractional data type, and the MIPS backend
will configure 31-bit fractional bits and no integer bits.
I am not sure if this meets the need for ADA. Thanks!
Regards,
Chao-ying
----- Original Message -----
From: "Duncan Sands" <duncan.sands@math.u-psud.fr>
To: "Robert Dewar" <dewar@adacore.com>
Cc: <gcc@gcc.gnu.org>; "Fu, Chao-Ying" <fu@mips.com>; "Thekkath, Radhika"
<radhika@mips.com>; "Stephens, Nigel" <nigel@mips.com>; "Arnaud Charlet"
<charlet@adacore.com>
Sent: Wednesday, October 04, 2006 3:19 AM
Subject: Re: Fixed-Point Arithmetic Project
> On Saturday 23 September 2006 17:08, Robert Dewar wrote:
> > Duncan Sands wrote:
> > >> We are working on a project to add fixed-point arithmetic support to
GCC.
> > >> A GCC project description page is available here
> > >> http://gcc.gnu.org/wiki/FixedPointArithmetic
> > >> and we will create a GCC branch in the near future. If you have
> > >> any suggestions or comments, please respond.
> > >
> > > I expect the Ada front-end people will be interested: the Ada language
> > > incorporates binary and decimal fixed point types. AFAIK, it is all
> > > done using emulation at the moment.
> >
> > I don't know what emulation means here, obviously there is little
> > hardware support. Ada generates perfectly efficient fixed-point code,
> > but the code is generated in the front end. It might be possible
> > to share back end code if the semantics is exactly what Ada needs.
>
> Making sure the semantics matches what Ada needs is a good reason to get
> involved at this early stage.
>
> Ciao,
>
> Duncan.
>