/[cmucl]/src/lisp/lisp.h
ViewVC logotype

Contents of /src/lisp/lisp.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations)
Sun Oct 10 14:54:52 2010 UTC (3 years, 6 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, cross-sol-x86-merged, cross-sol-x86-base, snapshot-2010-12, snapshot-2010-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, cross-sol-x86-2010-12-20, cross-sparc-branch-base, HEAD
Branch point for: cross-sparc-branch, cross-sol-x86-branch
Changes since 1.11: +3 -3 lines
File MIME type: text/plain
Use lowtag_Bits -1 instead a hard-wired 2.
1 /* $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/lisp.h,v 1.12 2010/10/10 14:54:52 rtoy Exp $ */
2
3 #ifndef _LISP_H_
4 #define _LISP_H_
5
6 #define LowtagOf(obj) ((obj)&lowtag_Mask)
7 #define TypeOf(obj) ((obj)&type_Mask)
8 #define HeaderValue(obj) ((unsigned long) ((obj)>>type_Bits))
9
10 #define Pointerp(obj) ((obj) & 0x01)
11 #define PTR(obj) ((obj)&~lowtag_Mask)
12
13 #define CONS(obj) ((struct cons *)((obj)-type_ListPointer))
14 #define SYMBOL(obj) ((struct symbol *)((obj)-type_OtherPointer))
15 #define FDEFN(obj) ((struct fdefn *)((obj)-type_OtherPointer))
16
17 #if !defined alpha
18 typedef unsigned long lispobj;
19
20 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__linux__)
21 typedef unsigned int u32;
22 typedef signed int s32;
23 #endif
24
25 #else
26 typedef unsigned int u32;
27 typedef signed int s32;
28 typedef u32 lispobj;
29 #endif
30
31 #define make_fixnum(n) ((lispobj)((n)<<(lowtag_Bits-1)))
32 #define fixnum_value(n) (((long)n)>>(lowtag_Bits-1))
33
34 #define boolean int
35 #ifndef TRUE
36 #define TRUE 1
37 #endif
38 #ifndef FALSE
39 #define FALSE 0
40 #endif
41
42 #define SymbolValue(sym) \
43 (((struct symbol *)((sym)-type_OtherPointer))->value)
44 #define SetSymbolValue(sym,val) \
45 (((struct symbol *)((sym)-type_OtherPointer))->value = (val))
46
47 /* This only words for static symbols. */
48 #define SymbolFunction(sym) \
49 (((struct fdefn *)(SymbolValue(sym)-type_OtherPointer))->function)
50
51 typedef enum {AUTO, X87, SSE2} fpu_mode_t;
52
53 #endif /* _LISP_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5