wingo pushed a commit to branch main
in repository guile.

commit 105a9c79584d6fb9b086beb83d8738f09875f26a
Author: Ekaitz Zarraga <eka...@elenq.tech>
AuthorDate: Mon Nov 18 21:12:03 2024 +0100

    riscv: error if not little endian
---
 lightening/riscv-cpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lightening/riscv-cpu.c b/lightening/riscv-cpu.c
index 38fa58a0b..101f7395b 100644
--- a/lightening/riscv-cpu.c
+++ b/lightening/riscv-cpu.c
@@ -17,6 +17,11 @@
  *      Paulo Cesar Pereira de Andrade
  *      Ekaitz Zarraga <eka...@elenq.tech>
  */
+
+#if __BYTE_ORDER != __LITTLE_ENDIAN
+#error RISC-V requires little-endian host
+#endif
+
 #define stack_framesize   (200 + 64)
 #define simm6_p(im)       ((im) <= 31 && (im) >= -32)
 #define simm12_p(im)      ((im) <= 2047 && (im) >= -2048)

Reply via email to