new function: is_lisp_immediate()
[sbcl/pkhuong.git] / src / runtime / x86-darwin-os.h
blobedc3a6ca848de83ee107637f001a86778b41dbc8
1 #ifndef _X86_DARWIN_OS_H
2 #define _X86_DARWIN_OS_H
4 #include <architecture/i386/table.h>
5 #include <i386/user_ldt.h>
7 #include "darwin-os.h"
9 typedef int os_context_register_t;
11 static inline os_context_t *arch_os_get_context(void **void_context)
13 return (os_context_t *) *void_context;
16 void set_data_desc_size(data_desc_t* desc, unsigned long size);
17 void set_data_desc_addr(data_desc_t* desc, void* addr);
19 /* As of XCode 3.0, the field names for the thread state have changed
20 * and now are prepended with __. Use some #define hackery to deal
21 * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if
22 * we need the new style field names.
24 #if MAC_OS_X_VERSION_10_5
26 #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->__ss.__##stem
27 #define EIP __eip
28 #define ESP __esp
29 #define EBP __ebp
30 #define EAX __eax
31 #define EBX __ebx
32 #define ECX __ecx
33 #define EDX __edx
34 #define ESI __esi
35 #define EDI __edi
36 #define EFLAGS __eflags
37 #define CS __cs
38 #define DS __ds
39 #define ES __es
40 #define FS __fs
41 #define SS __ss
42 #define GS __gs
44 #else
46 #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->ss.stem
47 #define EIP eip
48 #define ESP esp
49 #define EBP ebp
50 #define EAX eax
51 #define EBX ebx
52 #define ECX ecx
53 #define EDX edx
54 #define ESI esi
55 #define EDI edi
56 #define EFLAGS eflags
57 #define CS cs
58 #define DS ds
59 #define ES es
60 #define FS fs
61 #define SS ss
62 #define GS gs
64 #endif /* MAC_OS_X_VERSION_10_5 */
68 #endif /* _X86_DARWIN_OS_H */