diff src/lisp.h @ 111815:2278399d2eb9

Remove EXPLICIT_SIGN_EXTEND. * lisp.h (union Lisp_Object): Explicitly declare signedness of bit-field. (XINT): Remove variant for EXPLICIT_SIGN_EXTEND. * m/alpha.h (EXPLICIT_SIGN_EXTEND): Don't define. * m/amdx86-64.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/ia64.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/ibms390.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/ibms390x.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/iris4d.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/m68k.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/sparc.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/template.h (EXPLICIT_SIGN_EXTEND): Likewise. * m/hp800.h: Remove file. * m/mips.h: Remove file. * CPP-DEFINES (EXPLICIT_SIGN_EXTEND): Remove.
author Andreas Schwab <schwab@linux-m68k.org>
date Fri, 03 Dec 2010 21:55:23 +0100
parents b9616a1b568d
children e567154bfaa7 ac49e05bfcf2
line wrap: on
line diff
--- a/src/lisp.h	Fri Dec 03 09:40:46 2010 -0800
+++ b/src/lisp.h	Fri Dec 03 21:55:23 2010 +0100
@@ -267,7 +267,9 @@
 
     struct
       {
-	EMACS_INT val  : VALBITS;
+	/* Use explict signed, the signedness of a bit-field of type
+	   int is implementation defined.  */
+	signed EMACS_INT val  : VALBITS;
 	enum Lisp_Type type : GCTYPEBITS;
       } s;
     struct
@@ -290,7 +292,9 @@
     struct
       {
 	enum Lisp_Type type : GCTYPEBITS;
-	EMACS_INT val  : VALBITS;
+	/* Use explict signed, the signedness of a bit-field of type
+	   int is implementation defined.  */
+	signed EMACS_INT val  : VALBITS;
       } s;
     struct
       {
@@ -447,20 +451,8 @@
 #endif
 
 #define XHASH(a) ((a).i)
-
 #define XTYPE(a) ((enum Lisp_Type) (a).u.type)
-
-#ifdef EXPLICIT_SIGN_EXTEND
-/* Make sure we sign-extend; compilers have been known to fail to do so.
-   We additionally cast to EMACS_INT since it seems that some compilers
-   have been known to fail to do so, even though the bitfield is declared
-   as EMACS_INT already.  */
-#define XINT(a) ((((EMACS_INT) (a).s.val) << (BITS_PER_EMACS_INT - VALBITS)) \
-		 >> (BITS_PER_EMACS_INT - VALBITS))
-#else
 #define XINT(a) ((a).s.val)
-#endif /* EXPLICIT_SIGN_EXTEND */
-
 #define XUINT(a) ((a).u.val)
 
 #ifdef USE_LSB_TAG