comparison src/lisp.h @ 13363:941c37982f37

(BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG): Rename from SHORTBITS, INTBITS, LONGBITS.
author Karl Heuer <kwzh@gnu.org>
date Tue, 31 Oct 1995 02:34:16 +0000
parents 74a891e3ef44
children ee40177f6c68
comparison
equal deleted inserted replaced
13362:1220026cd3a3 13363:941c37982f37
100 100
101 enum gdb_lisp_params 101 enum gdb_lisp_params
102 { 102 {
103 gdb_valbits = VALBITS, 103 gdb_valbits = VALBITS,
104 gdb_gctypebits = GCTYPEBITS, 104 gdb_gctypebits = GCTYPEBITS,
105 gdb_emacs_intbits = sizeof (EMACS_INT) * INTBITS / sizeof (int), 105 gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR,
106 #ifdef DATA_SEG_BITS 106 #ifdef DATA_SEG_BITS
107 gdb_data_seg_bits = DATA_SEG_BITS 107 gdb_data_seg_bits = DATA_SEG_BITS
108 #else 108 #else
109 gdb_data_seg_bits = 0 109 gdb_data_seg_bits = 0
110 #endif 110 #endif
269 #define XSETFASTINT(a, b) ((a) = (b)) 269 #define XSETFASTINT(a, b) ((a) = (b))
270 270
271 /* Extract the value of a Lisp_Object as a signed integer. */ 271 /* Extract the value of a Lisp_Object as a signed integer. */
272 272
273 #ifndef XINT /* Some machines need to do this differently. */ 273 #ifndef XINT /* Some machines need to do this differently. */
274 #define XINT(a) (((a) << (INTBITS-VALBITS)) >> (INTBITS-VALBITS)) 274 #define XINT(a) (((a) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
275 #endif 275 #endif
276 276
277 /* Extract the value as an unsigned integer. This is a basis 277 /* Extract the value as an unsigned integer. This is a basis
278 for extracting it as a pointer to a structure in storage. */ 278 for extracting it as a pointer to a structure in storage. */
279 279
314 314
315 #ifndef XGCTYPE 315 #ifndef XGCTYPE
316 #define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK)) 316 #define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
317 #endif 317 #endif
318 318
319 #if VALBITS + GCTYPEBITS == INTBITS - 1 319 #if VALBITS + GCTYPEBITS == BITS_PER_INT - 1
320 /* Make XMARKBIT faster if mark bit is sign bit. */ 320 /* Make XMARKBIT faster if mark bit is sign bit. */
321 #ifndef XMARKBIT 321 #ifndef XMARKBIT
322 #define XMARKBIT(a) ((a) < 0) 322 #define XMARKBIT(a) ((a) < 0)
323 #endif 323 #endif
324 #endif /* markbit is sign bit */ 324 #endif /* markbit is sign bit */
352 #define XFASTINT(a) ((a).i + 0) 352 #define XFASTINT(a) ((a).i + 0)
353 #define XSETFASTINT(a, b) ((a).i = (b)) 353 #define XSETFASTINT(a, b) ((a).i = (b))
354 354
355 #ifdef EXPLICIT_SIGN_EXTEND 355 #ifdef EXPLICIT_SIGN_EXTEND
356 /* Make sure we sign-extend; compilers have been known to fail to do so. */ 356 /* Make sure we sign-extend; compilers have been known to fail to do so. */
357 #define XINT(a) (((a).i << (INTBITS-VALBITS)) >> (INTBITS-VALBITS)) 357 #define XINT(a) (((a).i << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
358 #else 358 #else
359 #define XINT(a) ((a).s.val) 359 #define XINT(a) ((a).s.val)
360 #endif /* EXPLICIT_SIGN_EXTEND */ 360 #endif /* EXPLICIT_SIGN_EXTEND */
361 361
362 #define XUINT(a) ((a).u.val) 362 #define XUINT(a) ((a).u.val)