aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorAndreas Schwab2010-12-03 17:08:05 -0500
committerChong Yidong2010-12-03 17:08:05 -0500
commit201ef780e052dc7c37ea5829d9a9cea9c4fd568b (patch)
treeca94cf25a887ecb9483e7b7d14e534425367ae12 /src/lisp.h
parent1b811c905aaad902b31308de1770bb78194f97ae (diff)
downloademacs-201ef780e052dc7c37ea5829d9a9cea9c4fd568b.tar.gz
emacs-201ef780e052dc7c37ea5829d9a9cea9c4fd568b.zip
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.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lisp.h b/src/lisp.h
index b6ae2dcd073..7c3c1f3780e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -267,7 +267,9 @@ union Lisp_Object
267 267
268 struct 268 struct
269 { 269 {
270 EMACS_INT val : VALBITS; 270 /* Use explict signed, the signedness of a bit-field of type
271 int is implementation defined. */
272 signed EMACS_INT val : VALBITS;
271 enum Lisp_Type type : GCTYPEBITS; 273 enum Lisp_Type type : GCTYPEBITS;
272 } s; 274 } s;
273 struct 275 struct
@@ -290,7 +292,9 @@ union Lisp_Object
290 struct 292 struct
291 { 293 {
292 enum Lisp_Type type : GCTYPEBITS; 294 enum Lisp_Type type : GCTYPEBITS;
293 EMACS_INT val : VALBITS; 295 /* Use explict signed, the signedness of a bit-field of type
296 int is implementation defined. */
297 signed EMACS_INT val : VALBITS;
294 } s; 298 } s;
295 struct 299 struct
296 { 300 {
@@ -447,20 +451,8 @@ enum pvec_type
447#endif 451#endif
448 452
449#define XHASH(a) ((a).i) 453#define XHASH(a) ((a).i)
450
451#define XTYPE(a) ((enum Lisp_Type) (a).u.type) 454#define XTYPE(a) ((enum Lisp_Type) (a).u.type)
452
453#ifdef EXPLICIT_SIGN_EXTEND
454/* Make sure we sign-extend; compilers have been known to fail to do so.
455 We additionally cast to EMACS_INT since it seems that some compilers
456 have been known to fail to do so, even though the bitfield is declared
457 as EMACS_INT already. */
458#define XINT(a) ((((EMACS_INT) (a).s.val) << (BITS_PER_EMACS_INT - VALBITS)) \
459 >> (BITS_PER_EMACS_INT - VALBITS))
460#else
461#define XINT(a) ((a).s.val) 455#define XINT(a) ((a).s.val)
462#endif /* EXPLICIT_SIGN_EXTEND */
463
464#define XUINT(a) ((a).u.val) 456#define XUINT(a) ((a).u.val)
465 457
466#ifdef USE_LSB_TAG 458#ifdef USE_LSB_TAG