git: 723e60a278b1 - main - libgcc_s: __extendxftf2 and __trunctfxf2 are amd64-only

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 02 May 2024 17:14:40 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=723e60a278b16fc4411cb4d9f201cb3ba26108cf

commit 723e60a278b16fc4411cb4d9f201cb3ba26108cf
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-05-02 17:13:23 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-05-02 17:13:23 +0000

    libgcc_s: __extendxftf2 and __trunctfxf2 are amd64-only
    
    __extendxftf2 and __trunctfxf2 build on amd64 not aarch64 and riscv.
    
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D45052
---
 lib/libcompiler_rt/Makefile.inc |  8 ++++++--
 lib/libgcc_s/Symbol.map         | 10 ++++++----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc
index 9aea0f2b051a..6fb13cb12305 100644
--- a/lib/libcompiler_rt/Makefile.inc
+++ b/lib/libcompiler_rt/Makefile.inc
@@ -132,7 +132,6 @@ SRCF+=		floatundisf
 #
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
 SRCF+=		divxc3
-SRCF+=		extendxftf2
 SRCF+=		fixxfdi
 SRCF+=		fixxfti
 SRCF+=		fixunsxfdi
@@ -142,7 +141,6 @@ SRCF+=		floattixf
 SRCF+=		floatuntixf
 SRCF+=		mulxc3
 SRCF+=		powixf2
-SRCF+=		trunctfxf2
 
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
@@ -154,6 +152,12 @@ SRCF+=		floatundixf
 .endif
 .endif
 
+# 128-bit float is an amd64 feature
+.if ${MACHINE_CPUARCH} == "amd64"
+SRCF+=		extendxftf2
+SRCF+=		trunctfxf2
+.endif
+
 # __cpu_model support, only used on aarch64 and x86
 .if ${MACHINE_CPUARCH} == "aarch64"
 SRCS+=		cpu_model/aarch64.c
diff --git a/lib/libgcc_s/Symbol.map b/lib/libgcc_s/Symbol.map
index def8f0981664..00b0ed789cf1 100644
--- a/lib/libgcc_s/Symbol.map
+++ b/lib/libgcc_s/Symbol.map
@@ -191,15 +191,14 @@ GCC_4.3.0 {
 	__bswapsi2;
 };
 
-#if defined(__aarch64__) || defined(__riscv)
 GCC_4.6.0 {
+#if defined(__aarch64__) || defined(__riscv)
 	__addtf3;
 	__cmptf2;
 	__divtf3;
 	__eqtf2;
 	__extenddftf2;
 	__extendsftf2;
-	__extendxftf2;
 	__fixtfdi;
 	__fixtfsi;
 	__fixtfti;
@@ -221,10 +220,13 @@ GCC_4.6.0 {
 	__subtf3;
 	__trunctfdf2;
 	__trunctfsf2;
-	__trunctfxf2;
 	__unordtf2;
-};
 #endif
+#if defined(__amd64__)
+	__extendxftf2;
+	__trunctfxf2;
+#endif
+};
 
 GCC_7.0.0 {
 #ifdef __i386__