public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Keith Packard <keithp@keithp.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libgcc/m68k: More fixes for soft float
Date: Tue, 7 Jan 2025 14:59:32 -0700	[thread overview]
Message-ID: <fd2b9afb-807f-4d0e-9e25-111d241bd162@gmail.com> (raw)
In-Reply-To: <877c7e6xqt.fsf@keithp.com>



On 1/1/25 2:16 PM, Keith Packard wrote:
> I thought I had sent all of my m68k soft float fixes along last year,
> but it looks like I managed to leave some out. I had been building
> my toolchain from a private repo (oops), which masked my mistake. We're
> fixing that by automatically building toolchains from upstream source
> with a list of patches now, so this "shouldn't" happen again. Now to
> drive that list of patches to zero.
> 
> 
> 0001-libgcc-m68k-Fixes-for-soft-float.patch
> 
>  From 1a3e403603f5a687724c7e2f6625debc3d23d934 Mon Sep 17 00:00:00 2001
> From: Keith Packard<keithp@keithp.com>
> Date: Sun, 29 Dec 2024 01:42:29 -0800
> Subject: [PATCH] libgcc/m68k: Fixes for soft float
> 
> Fix __extenddfxf2:
> 
>    * Remove bogus denorm handling block which would never execute --
>      the converted exp value is always positive as EXCESSX > EXCESSD.
> 
>    * Compute the whole significand in dl instead of doing part of it in
>      ldl.
> 
>      * Mask off exponent from dl.l.upper so the denorm shift test
>        works.
> 
>      * Insert the hidden one bit into dl.l.upper as needed.
> 
> Fix __truncxfdf2 denorm handling. All that is required is to shift the
> significand right by the correct amount; it already has all of the
> necessary bits set including the explicit one. Compute the shift
> amount, then perform the wide shift across both elements of the
> significand.
> 
> Fix __fixxfsi:
> 
>    * The value  was off by a factor of two as the significand contains
>      32 bits, not 31 so we need to shift by one more than the equivalent
>      code in __fixdfsi.
> 
>    * Simplify the code having realized that the lower 32 bits of the
>      significand can never appear in the results.
> 
> Return positive qNaN instead of negative. For floats, qNaN is 0x7fff_ffff. For
> doubles, qNaN is 0x7fff_ffff_ffff_ffff.
> 
> Return correctly signed zero on float and double divide underflow. This means
> that Ld$underflow now expects d7 to contain the sign bit, just like the other
> return paths.
> 
> Signed-off-by: Keith Packard<keithp@keithp.com>
Thanks.  I pushed this to the trunk.

jeff


      reply	other threads:[~2025-01-07 21:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  2:15 [PATCH] libgcc/m68k: Fixes " Keith Packard
2023-11-10 23:49 ` Jeff Law
2023-11-11  1:02   ` Keith Packard
2023-11-11 17:51     ` Jeff Law
2025-01-01 21:16 ` [PATCH] libgcc/m68k: More fixes " Keith Packard
2025-01-07 21:59   ` Jeff Law [this message]

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=fd2b9afb-807f-4d0e-9e25-111d241bd162@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=keithp@keithp.com \
    /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).