Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/aarch64/softfloat Summary: Align softfloat flo...



details:   https://anonhg.NetBSD.org/src/rev/5ed3c39274ac
branches:  trunk
changeset: 446463:5ed3c39274ac
user:      tih <tih%NetBSD.org@localhost>
date:      Thu Dec 06 19:17:13 2018 +0000

description:
Summary: Align softfloat float128 with libgcc.

While libgcc adapts its float128 data structure to the endianness of
the architecture, the softfloat code in libc didn't.  With both of
them handling the same values, softfloat must follow the toolchain.

OK: riastradh

diffstat:

 lib/libc/arch/aarch64/softfloat/softfloat.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 979dfffc1439 -r 5ed3c39274ac lib/libc/arch/aarch64/softfloat/softfloat.h
--- a/lib/libc/arch/aarch64/softfloat/softfloat.h       Thu Dec 06 19:15:35 2018 +0000
+++ b/lib/libc/arch/aarch64/softfloat/softfloat.h       Thu Dec 06 19:17:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.h,v 1.1 2014/08/10 05:47:37 matt Exp $ */
+/* $NetBSD: softfloat.h,v 1.2 2018/12/06 19:17:13 tih Exp $ */
 
 /* This is a derivative work. */
 
@@ -46,6 +46,7 @@
 
 #include "softfloat-qp.h"
 
+#include <sys/endian.h>
 #include <machine/ieeefp.h>
 
 /*
@@ -63,7 +64,11 @@
 #endif
 #ifdef FLOAT128
 typedef struct {
+#if _BYTE_ORDER == _BIG_ENDIAN
     unsigned long long high, low;
+#else
+    unsigned long long low, high;
+#endif
 } float128;
 #endif
 



Home | Main Index | Thread Index | Old Index