From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21384 invoked by alias); 11 Sep 2014 01:31:09 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21371 invoked by uid 89); 11 Sep 2014 01:31:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f41.google.com Received: from mail-la0-f41.google.com (HELO mail-la0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 11 Sep 2014 01:31:07 +0000 Received: by mail-la0-f41.google.com with SMTP id s18so10969836lam.28 for ; Wed, 10 Sep 2014 18:31:04 -0700 (PDT) X-Received: by 10.112.17.2 with SMTP id k2mr25973218lbd.28.1410399063952; Wed, 10 Sep 2014 18:31:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.105.230 with HTTP; Wed, 10 Sep 2014 18:30:43 -0700 (PDT) From: Sheheryar Qazi Date: Thu, 11 Sep 2014 01:31:00 -0000 Message-ID: Subject: Changing Mantissa's Width in Non-IEEE Floating Point implementation To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-09/txt/msg00068.txt.bz2 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