This patch tags libf7 object files with the double / long double ABI
.gnu_attribute 8 (Tag_GNU_AVR_BITS_DOUBLE) resp.
.gnu_attribute 12 (Tag_GNU_AVR_BITS_LONG_DOUBLE).
It follows the compiler in that it only tags units where the
size of double / long double is actually used.

Applied to trunk.

Johann

--

        PR target/127032
libgcc/config/avr/libf7/
        * libf7-asm.sx (config.h): Include it.
        (DALIAS) [sizeof(double)==8 && HAVE_AS_AVR_GNU_ATTRIBUTE]:
        Add .gnu_attribute 8,64.
        (LALIAS) [sizeof(long double)==8 && HAVE_AS_AVR_GNU_ATTRIBUTE]:
        Add .gnu_attribute 12,64.
diff --git a/libgcc/config/avr/libf7/libf7-asm.sx b/libgcc/config/avr/libf7/libf7-asm.sx
index f96c2a73d58..e8a62bc8a9a 100644
--- a/libgcc/config/avr/libf7/libf7-asm.sx
+++ b/libgcc/config/avr/libf7/libf7-asm.sx
@@ -27,6 +27,7 @@
 
 #include "asm-defs.h"
 #include "libf7.h"
+#include "config.h"
 
 #define ZERO __zero_reg__
 #define TMP  __tmp_reg__
@@ -96,6 +97,9 @@
 ;; Make a weak alias if double is 64 bits wide.
 .macro  DALIAS  sym
 #if defined (WITH_LIBF7_MATH_SYMBOLS) && __SIZEOF_DOUBLE__ == 8
+#if defined (HAVE_AS_AVR_GNU_ATTRIBUTE)
+    .gnu_attribute 8,64
+#endif
 ALIAS \sym
 #endif
 .endm
@@ -103,6 +107,9 @@
 ;; Make a weak alias if long double is 64 bits wide.
 .macro  LALIAS  sym
 #if defined (WITH_LIBF7_MATH_SYMBOLS) && __SIZEOF_LONG_DOUBLE__ == 8
+#if defined (HAVE_AS_AVR_GNU_ATTRIBUTE)
+    .gnu_attribute 12,64
+#endif
 ALIAS \sym
 #endif
 .endm

Reply via email to