public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: hongtao Liu <liuhongt@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-3310] libgcc: Enable hfmode soft-sf/df/xf/tf extensions and truncations.
Date: Thu,  2 Sep 2021 06:12:43 +0000 (GMT)	[thread overview]
Message-ID: <20210902061243.7FCCE385EC44@sourceware.org> (raw)

https://gcc.gnu.org/g:b387e664cfa4e9dd010a3f64d446308d6d84a5d2

commit r12-3310-gb387e664cfa4e9dd010a3f64d446308d6d84a5d2
Author: liuhongt <hongtao.liu@intel.com>
Date:   Mon Jul 5 17:31:46 2021 +0800

    libgcc: Enable hfmode soft-sf/df/xf/tf extensions and truncations.
    
    libgcc/ChangeLog:
    
            * config/i386/32/sfp-machine.h (_FP_NANFRAC_H): New macro.
            * config/i386/64/sfp-machine.h (_FP_NANFRAC_H): Ditto.
            * config/i386/sfp-machine.h (_FP_NANSIGN_H): Ditto.
            * config/i386/t-softfp: Add hf soft-fp.
            * config.host: Add i386/64/t-softfp.
            * config/i386/64/t-softfp: New file.

Diff:
---
 libgcc/config.host                  | 5 +----
 libgcc/config/i386/32/sfp-machine.h | 1 +
 libgcc/config/i386/64/sfp-machine.h | 1 +
 libgcc/config/i386/64/t-softfp      | 1 +
 libgcc/config/i386/sfp-machine.h    | 1 +
 libgcc/config/i386/t-softfp         | 5 +++++
 6 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/libgcc/config.host b/libgcc/config.host
index 8b636743c63..e2b4be47520 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1539,10 +1539,7 @@ i[34567]86-*-elfiamcu | i[34567]86-*-rtems*)
 	;;
 i[34567]86-*-* | x86_64-*-*)
   	tmake_file="${tmake_file} t-softfp-tf"
-	if test "${host_address}" = 32; then
-		tmake_file="${tmake_file} i386/${host_address}/t-softfp"
-	fi
-	tmake_file="${tmake_file} i386/t-softfp t-softfp"
+	tmake_file="${tmake_file} i386/${host_address}/t-softfp i386/t-softfp t-softfp"
 	;;
 esac
 
diff --git a/libgcc/config/i386/32/sfp-machine.h b/libgcc/config/i386/32/sfp-machine.h
index 1fa282d7afe..e24cbc8d180 100644
--- a/libgcc/config/i386/32/sfp-machine.h
+++ b/libgcc/config/i386/32/sfp-machine.h
@@ -86,6 +86,7 @@
 #define _FP_DIV_MEAT_D(R,X,Y)   _FP_DIV_MEAT_2_udiv(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)   _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
 
+#define _FP_NANFRAC_H		_FP_QNANBIT_H
 #define _FP_NANFRAC_S		_FP_QNANBIT_S
 #define _FP_NANFRAC_D		_FP_QNANBIT_D, 0
 /* Even if XFmode is 12byte,  we have to pad it to
diff --git a/libgcc/config/i386/64/sfp-machine.h b/libgcc/config/i386/64/sfp-machine.h
index 1ff94c23ea4..e1c616699bb 100644
--- a/libgcc/config/i386/64/sfp-machine.h
+++ b/libgcc/config/i386/64/sfp-machine.h
@@ -13,6 +13,7 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
 
 #define _FP_DIV_MEAT_Q(R,X,Y)   _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
 
+#define _FP_NANFRAC_H		_FP_QNANBIT_H
 #define _FP_NANFRAC_S		_FP_QNANBIT_S
 #define _FP_NANFRAC_D		_FP_QNANBIT_D
 #define _FP_NANFRAC_E		_FP_QNANBIT_E, 0
diff --git a/libgcc/config/i386/64/t-softfp b/libgcc/config/i386/64/t-softfp
new file mode 100644
index 00000000000..f9d8b3a945c
--- /dev/null
+++ b/libgcc/config/i386/64/t-softfp
@@ -0,0 +1 @@
+softfp_extras := fixhfti fixunshfti floattihf floatuntihf
diff --git a/libgcc/config/i386/sfp-machine.h b/libgcc/config/i386/sfp-machine.h
index 8319f0550bc..f15d29d3755 100644
--- a/libgcc/config/i386/sfp-machine.h
+++ b/libgcc/config/i386/sfp-machine.h
@@ -17,6 +17,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_KEEPNANFRACP	1
 #define _FP_QNANNEGATEDP 0
 
+#define _FP_NANSIGN_H		1
 #define _FP_NANSIGN_S		1
 #define _FP_NANSIGN_D		1
 #define _FP_NANSIGN_E		1
diff --git a/libgcc/config/i386/t-softfp b/libgcc/config/i386/t-softfp
index 685d9cf8502..4ac214eb0ce 100644
--- a/libgcc/config/i386/t-softfp
+++ b/libgcc/config/i386/t-softfp
@@ -1 +1,6 @@
 LIB2ADD += $(srcdir)/config/i386/sfp-exceptions.c
+
+softfp_extensions := hfsf hfdf hftf hfxf sfdf sftf dftf xftf
+softfp_truncations := tfhf xfhf dfhf sfhf tfsf dfsf tfdf tfxf
+
+softfp_extras += eqhf2
\ No newline at end of file


                 reply	other threads:[~2021-09-02  6:12 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=20210902061243.7FCCE385EC44@sourceware.org \
    --to=liuhongt@gcc.gnu.org \
    --cc=gcc-cvs@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).