public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sheheryar Qazi <sherry1.sherry1@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Changing Mantissa's Width in Non-IEEE Floating Point implementation
Date: Thu, 11 Sep 2014 01:31:00 -0000	[thread overview]
Message-ID: <CAH6n9wxarW74RO=R7XqvPDhpxd6F84OQPh9Magt8oRw-xx-BDg@mail.gmail.com> (raw)

Hi,
I have a gcc cross compiler on an 18 bit soft-core processor target
that has the following datatypes defined:
Integer 18 bit, Long 36 bit and float 36-bit(single precision).
Right now my focus is on floating point operation. Since the width is
non-standard(36 bit), I have the following scheme: 27 bits for
Mantissa(significand), 8 bits for Exponents and 1 Sign bit.
I can see the widths are defined in the float.h file. of interest to
me are the following:
FLT_MANT_DIG  and FLT_DIG.
They are defined as:

FLT_MANT_DIG 24
FLT_DIG 6

I have changed them to

FLT_MANT_DIG 28
 FLT_DIG 9

As per my requirements in float.h and then build the gcc compiler. But
still I get 32 bit floating point output.Do anyone has any experience
implementing non-standard single precision floating point numbers
and/or know wat changes are needed please let me know.
Sincerely
Sheheryar

                 reply	other threads:[~2014-09-11  1:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH6n9wxarW74RO=R7XqvPDhpxd6F84OQPh9Magt8oRw-xx-BDg@mail.gmail.com' \
    --to=sherry1.sherry1@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).