emacs-diffs
[Top][All Lists]
Advanced

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

scratch/igc 2e2c41fdcda 2/2: [MPS] Another hypothetical 32-bit big-endia


From: Pip Cet
Subject: scratch/igc 2e2c41fdcda 2/2: [MPS] Another hypothetical 32-bit big-endian WIDE_EMACS_INT fix
Date: Wed, 11 Dec 2024 13:54:58 -0500 (EST)

branch: scratch/igc
commit 2e2c41fdcda7240c63e906ef0039dcf5a35d82f2
Author: Pip Cet <pipcet@protonmail.com>
Commit: Pip Cet <pipcet@protonmail.com>

    [MPS] Another hypothetical 32-bit big-endian WIDE_EMACS_INT fix
    
    * src/igc.c (fix_weak_hash_table_strong_part): Fix the right 32-bit
    word on 32-bit big-endian systems with 64-bit EMACS_INT types.
---
 src/igc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/igc.c b/src/igc.c
index 7db6de6d7f7..eb72406e529 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -2185,7 +2185,11 @@ fix_weak_hash_table_strong_part (mps_ss_t ss, struct 
Lisp_Weak_Hash_Table_Strong
          }
        for (ssize_t i = 2 * XFIXNUM (t->table_size); i < limit; i++)
          {
-           IGC_FIX12_BASE (ss, &t->entries[i].intptr);
+           intptr_t off = 0;
+#ifdef WORDS_BIGENDIAN
+           off = sizeof (t->entries[i].intptr) - sizeof (mps_word_t);
+#endif
+           IGC_FIX12_BASE (ss, ((char *)&t->entries[i].intptr) + off);
          }
       }
   }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]