Mercurial > emacs
comparison src/lisp.h @ 111819:03dcd8e4c9c7
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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 03 Dec 2010 17:08:05 -0500 |
parents | e567154bfaa7 |
children |
comparison
equal
deleted
inserted
replaced
111818:6da5e88812e5 | 111819:03dcd8e4c9c7 |
---|---|
265 also, positive integers can be accessed fast this way. */ | 265 also, positive integers can be accessed fast this way. */ |
266 EMACS_UINT i; | 266 EMACS_UINT i; |
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 |
274 { | 276 { |
275 EMACS_UINT val : VALBITS; | 277 EMACS_UINT val : VALBITS; |
288 EMACS_UINT i; | 290 EMACS_UINT i; |
289 | 291 |
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 { |
297 enum Lisp_Type type : GCTYPEBITS; | 301 enum Lisp_Type type : GCTYPEBITS; |
298 EMACS_UINT val : VALBITS; | 302 EMACS_UINT val : VALBITS; |
445 #ifdef USE_2_TAGS_FOR_INTS | 449 #ifdef USE_2_TAGS_FOR_INTS |
446 # error "USE_2_TAGS_FOR_INTS is not supported with USE_LISP_UNION_TYPE" | 450 # error "USE_2_TAGS_FOR_INTS is not supported with USE_LISP_UNION_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 |
467 | 459 |
468 # define XSET(var, vartype, ptr) \ | 460 # define XSET(var, vartype, ptr) \ |