From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) by sourceware.org (Postfix) with ESMTPS id 30A1E3840C36 for ; Tue, 26 May 2020 04:16:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 30A1E3840C36 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca Received: from [192.168.1.104] ([24.64.172.44]) by shaw.ca with ESMTP id dQmRjECVI62brdQmTjSUcT; Mon, 25 May 2020 22:01:34 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=s1G7sxBSAAAA:20 a=_ctWjzdLAAAA:8 a=HIoIN3QyAAAA:8 a=jChkm-x5hCMFubTIiR0A:9 a=QEXdDO2ut3YA:10 a=jTdGoiaPEY0A:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=WoGCsytTnHKj16XvecxK:22 a=MbFZXBXkOCLWhBDvYpC8:22 Reply-To: newlib@sourceware.org Subject: Re: Soft Floating Point Exceptions To: newlib@sourceware.org References: From: Brian Inglis Autocrypt: addr=Brian.Inglis@SystematicSw.ab.ca; prefer-encrypt=mutual; keydata= mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software Message-ID: <5cb902e1-03b3-2f1b-ebbf-6adc4c13ff4f@SystematicSw.ab.ca> Date: Mon, 25 May 2020 22:01:31 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfIz9dA2/D+w0O+Rs9cHSiMBrDGHJn4nQ0SSaiuRJYcKssxHncy/DyD9MYX5mH220mnlnRcJK66a98eEvkNDLYWLEYpaIFBnP/ZC4jcA19KY5P1Q83GRD W4cy2Y4cNwbVUT2jtgknouc8xftmQoGV31DQ/NUB/EeLACWC8Z94Hm+3J398iibl6Ax/pUNxM7qCJg== X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 04:16:37 -0000 On 2020-05-25 15:43, Brian Inglis wrote: > On 2020-05-25 11:17, Joel Sherrill wrote: >> An RTEMS GSoC student (Eshan Dhawan) has almost completed porting the >> FreeBSD fenv code to newlib. Unfortunately, the software floating point >> code calls __softfloat_float_raise which has a couple of issues. First, he >> can't find the code which probably indicates an issue in the BSD world but >> no one likely cares because I doubt there is a BSD install on an ARM with >> soft floating point. >> >> Second, to use this in newlib, we will be relying on GCC's soft float >> implementation which means something different has to happen. Is there an >> equivalent routine in GCC? What should happen for >> __softfloat_float_raise()? > > You will have to look at these to see what is relevant to your issue. > > Interface: > > $ info gccint libgcc soft > > implementation: > > https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/sfp-machine.h;hb=HEAD > https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/ieee754-sf.S;hb=HEAD > https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/ieee754-df.S;hb=HEAD > https://gcc.gnu.org/git?p=gcc.git;a=blob_plain;f=libgcc/config/arm/fp16.c;hb=HEAD > > implementation: > > https://github.com/freebsd/freebsd/commit/85aab3336e0d6172ddd5fe3cde38389abd612728 > https://github.com/freebsd/freebsd/tree/master/lib/libc/softfloat > https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat.txt#L357 > https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat-for-gcc.h > https://github.com/freebsd/freebsd/blob/master/lib/libc/softfloat/softfloat-specialize#L67 > > alternative: > > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/arch/arm/softfloat/ also http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/softfloat/ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc_fp/ and for latest updates: http://www.jhauser.us/arithmetic/SoftFloat.html -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.]