# HG changeset patch # User aidan # Date 1182471677 0 # Node ID f9a0570637f376b6588d230136d77caa4375a663 # Parent f901409b074bc69610c185d6d9fce949817d3974 [xemacs-hg @ 2007-06-22 00:21:12 by aidan] #ifdef out problematic AMD64 code, eval.c, record_unwind_protect_restoring_int, restore_int. diff -r f901409b074b -r f9a0570637f3 src/ChangeLog --- a/src/ChangeLog Thu Jun 21 23:27:16 2007 +0000 +++ b/src/ChangeLog Fri Jun 22 00:21:17 2007 +0000 @@ -1,3 +1,12 @@ +2007-06-22 Aidan Kehoe + + * 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 * eval.c (Feval): diff -r f901409b074b -r f9a0570637f3 src/eval.c --- a/src/eval.c Thu Jun 21 23:27:16 2007 +0000 +++ b/src/eval.c Fri Jun 22 00:21:17 2007 +0000 @@ -6009,13 +6009,23 @@ 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 @@ 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)); }