libgcc: Enable hfmode soft-sf/df/xf/tf extensions and truncations.
authorliuhongt <hongtao.liu@intel.com>
Mon, 5 Jul 2021 09:31:46 +0000 (17:31 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 2 Sep 2021 06:11:59 +0000 (14:11 +0800)
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.

libgcc/config.host
libgcc/config/i386/32/sfp-machine.h
libgcc/config/i386/64/sfp-machine.h
libgcc/config/i386/64/t-softfp [new file with mode: 0644]
libgcc/config/i386/sfp-machine.h
libgcc/config/i386/t-softfp

index 8b63674..e2b4be4 100644 (file)
@@ -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
 
index 1fa282d..e24cbc8 100644 (file)
@@ -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
index 1ff94c2..e1c6166 100644 (file)
@@ -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 (file)
index 0000000..f9d8b3a
--- /dev/null
@@ -0,0 +1 @@
+softfp_extras := fixhfti fixunshfti floattihf floatuntihf
index 8319f05..f15d29d 100644 (file)
@@ -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
index 685d9cf..4ac214e 100644 (file)
@@ -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