User: aidan
Date: 07/06/22 02:21:26
Modified: xemacs/src ChangeLog eval.c
Log:
#ifdef out problematic AMD64 code, eval.c, record_unwind_protect_restoring_int, restore_int.
Revision Changes Path
1.1070 +9 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1069
retrieving revision 1.1070
diff -u -p -r1.1069 -r1.1070
--- ChangeLog 2007/05/26 19:00:16 1.1069
+++ ChangeLog 2007/06/22 00:21:12 1.1070
@@ -1,3 +1,12 @@
+2007-06-22 Aidan Kehoe <kehoea at parhasard.net>
+
+ * eval.c (restore_int):
+ * eval.c (record_unwind_protect_restoring_int):
+ Conditionalise the munging of a C integer into a void pointer on
+ whether it's necessary at compile time, using INT_VALBITS (which
+ describes how many value bits a Lisp integer has) and INTBITS
+ (describing how many value bits a C integer has).
+
2007-05-24 Aidan Kehoe <kehoea at parhasard.net>
* eval.c (Feval):
1.97 +20 -1 XEmacs/xemacs/src/eval.c
Index: eval.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -p -r1.96 -r1.97
--- eval.c 2007/05/26 19:00:20 1.96
+++ eval.c 2007/06/22 00:21:17 1.97
@@ -6009,13 +6009,23 @@ restore_int (Lisp_Object cons)
int *addr = (int *) get_opaque_ptr (opaque);
int val;
+ /* In the event that a C integer will always fit in an Emacs int, we
+ haven't ever stored a C integer as an opaque pointer. This #ifdef
+ eliminates a warning on AMD 64, where EMACS_INT has 63 value bits and C
+ integers have 32 value bits. */
+#if INT_VALBITS < INTBITS
if (INTP (lval))
- val = XINT (lval);
+ {
+ val = XINT (lval);
+ }
else
{
val = (int) get_opaque_ptr (lval);
free_opaque_ptr (lval);
}
+#else /* !(INT_VALBITS < INTBITS) */
+ val = XINT(lval);
+#endif /* INT_VALBITS < INTBITS */
*addr = val;
free_opaque_ptr (opaque);
@@ -6032,10 +6042,19 @@ record_unwind_protect_restoring_int (int
Lisp_Object opaque = make_opaque_ptr (addr);
Lisp_Object lval;
+ /* In the event that a C integer will always fit in an Emacs int, we don't
+ ever want to store a C integer as an opaque pointer. This #ifdef
+ eliminates a warning on AMD 64, where EMACS_INT has 63 value bits and C
+ integers have 32 value bits. */
+#if INT_VALBITS <= INTBITS
if (NUMBER_FITS_IN_AN_EMACS_INT (val))
lval = make_int (val);
else
lval = make_opaque_ptr ((void *) val);
+#else /* !(INT_VALBITS < INTBITS) */
+ lval = make_int (val);
+#endif /* INT_VALBITS <= INTBITS */
+
return record_unwind_protect (restore_int, noseeum_cons (opaque, lval));
}