Mercurial > hg > xemacs-beta
changeset 4025:f9a0570637f3
[xemacs-hg @ 2007-06-22 00:21:12 by aidan]
#ifdef out problematic AMD64 code, eval.c, record_unwind_protect_restoring_int, restore_int.
author | aidan |
---|---|
date | Fri, 22 Jun 2007 00:21:17 +0000 |
parents | f901409b074b |
children | 4d60c2708e5d |
files | src/ChangeLog src/eval.c |
diffstat | 2 files changed, 29 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@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@parhasard.net> * eval.c (Feval):
--- 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)); }