public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Set __IEEE_BIG_ENDIAN for big endian RISC-V
@ 2021-02-25 11:14 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2021-02-25 11:14 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1a6fd3f05f4ecbb702496638c3b682d024e61eda

commit 1a6fd3f05f4ecbb702496638c3b682d024e61eda
Author: Marcus Comstedt <marcus@mc.pp.se>
Date:   Tue Feb 23 22:31:16 2021 +0100

    Set __IEEE_BIG_ENDIAN for big endian RISC-V

Diff:
---
 newlib/libc/include/machine/ieeefp.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index 4dc13828c..3c1f41e03 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -199,7 +199,11 @@
 #endif
 
 #ifdef __riscv
+#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define __IEEE_BIG_ENDIAN
+#else
 #define __IEEE_LITTLE_ENDIAN
+#endif
 #ifdef __riscv_flen
 # define _SUPPORTS_ERREXCEPT
 #endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-25 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 11:14 [newlib-cygwin] Set __IEEE_BIG_ENDIAN for big endian RISC-V Corinna Vinschen

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).