source: branches/win64/lisp-kernel/lisp.h @ 8786

Last change on this file since 8786 was 8786, checked in by gb, 12 years ago

What comes after 4 ? Why, PLATFORM_OS_WINDOWS, of course. (Should
match definition in compiler/backend.lisp.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/*
2   Copyright (C) 1994-2001 Digitool, Inc
3   This file is part of OpenMCL. 
4
5   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6   License , known as the LLGPL and distributed with OpenMCL as the
7   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8   which is distributed with OpenMCL as the file "LGPL".  Where these
9   conflict, the preamble takes precedence. 
10
11   OpenMCL is referenced in the preamble as the "LIBRARY."
12
13   The LLGPL is also available online at
14   http://opensource.franz.com/preamble.html
15*/
16
17#ifndef __lisp__
18#define __lisp__
19
20
21
22#include "lisptypes.h"
23
24#ifdef PPC
25#include "ppc-constants.h"
26#endif
27#ifdef X86
28#include "x86-constants.h"
29#endif
30#include "macros.h"
31
32extern Boolean use_mach_exception_handling;
33#ifdef DARWIN
34extern Boolean running_under_rosetta;
35#endif
36
37extern int page_size, log2_page_size;
38
39static inline natural
40_align_to_power_of_2(natural n, unsigned power)
41{
42  natural align = (1<<power) -1;
43
44  return (n+align) & ~align;
45}
46
47#define align_to_power_of_2(n,p) _align_to_power_of_2(((natural)(n)),p)
48
49static inline natural
50_truncate_to_power_of_2(natural n, unsigned power)
51{
52  return n & ~((1<<power) -1);
53}
54
55#define truncate_to_power_of_2(n,p) _truncate_to_power_of_2((natural)(n),p)
56
57LispObj start_lisp(TCR*, LispObj);
58
59size_t
60ensure_stack_limit(size_t);
61
62#include "kernel-globals.h"
63#endif
64
65#define PLATFORM_WORD_SIZE_32 0
66#define PLATFORM_WORD_SIZE_64 64
67#define PLATFORM_CPU_PPC (0<<3)
68#define PLATFORM_CPU_SPARC (1<<3)
69#define PLATFORM_CPU_X86 (2<<3)
70#define PLATFORM_OS_VXWORKS 0
71#define PLATFORM_OS_LINUX 1
72#define PLATFORM_OS_SOLARIS 2
73#define PLATFORM_OS_DARWIN 3
74#define PLATFORM_OS_FREEBSD 4
75#define PLATFORM_OS_WINDOWS 5
76
77#ifdef LINUX
78#define PLATFORM_OS PLATFORM_OS_LINUX
79#endif
80
81#ifdef DARWIN
82#define PLATFORM_OS PLATFORM_OS_DARWIN
83#endif
84
85#ifdef FREEBSD
86#define PLATFORM_OS PLATFORM_OS_FREEBSD
87#endif
88
89#ifdef SOLARIS
90#define PLATFORM_OS PLATFORM_OS_SOLARIS
91#endif
92
93#ifdef WINDOWS
94#define PLATFORM_OS PLATFORM_OS_WINDOWS
95#endif
96
97#ifdef PPC
98#define PLATFORM_CPU PLATFORM_CPU_PPC
99#endif
100
101#ifdef X86
102#define PLATFORM_CPU PLATFORM_CPU_X86
103#endif
104
105#if (WORD_SIZE == 32)
106#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
107#endif
108
109#if (WORD_SIZE == 64)
110#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
111#endif
112
113#define PLATFORM (PLATFORM_OS|PLATFORM_CPU|PLATFORM_WORD_SIZE)
114
115
Note: See TracBrowser for help on using the repository browser.