Changeset 14048 for branches/qres/ccl


Ignore:
Timestamp:
Jul 27, 2010, 12:24:41 AM (9 years ago)
Author:
gz
Message:

from trunk, reorg of platform-specific kernel files (r13589-r13956)

Location:
branches/qres/ccl
Files:
8 added
15 edited
15 copied

Legend:

Unmodified
Added
Removed
  • branches/qres/ccl

  • branches/qres/ccl/lisp-kernel/Threads.h

    r13502 r14048  
    235235
    236236
    237 #if defined(SIGRTMIN) && !defined(SOLARIS)
    238 #define SIG_SUSPEND_THREAD (SIGRTMIN+6)
    239 #else
    240 #define SIG_SUSPEND_THREAD SIGUSR2
    241 #endif
    242 
    243 
    244 #ifdef DARWIN
    245 #define SIG_KILL_THREAD SIGEMT
    246 #endif
    247 
    248 #if defined(LINUX) && defined(SIGRTMIN)
    249 #define SIG_KILL_THREAD (SIGRTMIN+7)
    250 #endif
    251 
    252 #ifdef SOLARIS
    253 #define SIG_KILL_THREAD SIGRTMIN
    254 #endif
    255 
    256 #ifdef FREEBSD
    257 #define SIG_KILL_THREAD (SIGTHR+5)
    258 #endif
    259 
    260237
    261238extern int thread_suspend_signal, thread_kill_signal;
  • branches/qres/ccl/lisp-kernel/area.h

    r13070 r14048  
    123123#define MIN_VSTACK_SIZE (1<<16)
    124124#define VSTACK_HARDPROT (1<<12)
     125
    125126#define VSTACK_SOFTPROT (1<<16)
     127
    126128#define MIN_TSTACK_SIZE (1<<18)
    127129#define TSTACK_HARDPROT 0
    128130#define TSTACK_SOFTPROT (1<<16)
     131
    129132#ifdef PPC
    130133#define CS_OVERFLOW_FORCE_LIMIT ((natural)(-(sizeof(lisp_frame))))
     
    136139
    137140
    138 #ifdef PPC
    139 #ifdef LINUX
    140 #ifdef PPC64
    141 #define IMAGE_BASE_ADDRESS 0x100000000L
    142 #else
    143 #define IMAGE_BASE_ADDRESS 0x31000000
    144 #endif
    145 #endif
    146 #ifdef DARWIN
    147 #ifdef PPC64
    148 #define IMAGE_BASE_ADDRESS 0x100000000L
    149 #else
    150 #define IMAGE_BASE_ADDRESS 0x04000000
    151 #endif
    152 #endif
    153 #endif
    154141
    155 #ifdef X86
    156 #ifdef LINUX
    157 #ifdef X8664
    158 #define IMAGE_BASE_ADDRESS 0x300000000000L
    159 #else
    160 #define IMAGE_BASE_ADDRESS 0x10000000
    161 #endif
    162 #endif
    163 #ifdef FREEBSD
    164 #ifdef X8664
    165 #define IMAGE_BASE_ADDRESS 0x300000000000L /* 0x100000000L */
    166 #else
    167 #define IMAGE_BASE_ADDRESS 0x30000000
    168 #endif
    169 #endif
    170 #ifdef SOLARIS
    171 #ifdef X8664
    172 #define IMAGE_BASE_ADDRESS 0x300000000000L
    173 #else
    174 #define IMAGE_BASE_ADDRESS 0x10000000
    175 #endif
    176 #endif
    177 #ifdef DARWIN
    178 #ifdef X8664
    179 #define IMAGE_BASE_ADDRESS 0x300000000000L
    180 #else
    181 #define IMAGE_BASE_ADDRESS 0x04000000
    182 #endif
    183 #endif
    184 #endif
    185 #ifdef WINDOWS
    186 #ifdef X8664
    187 #define IMAGE_BASE_ADDRESS 0x100000000LL
    188 #else
    189 #define IMAGE_BASE_ADDRESS 0x04000000
    190 #endif
    191 #endif
    192142
    193143#ifdef X8664
     
    199149#define STATIC_RESERVE heap_segment_size
    200150
    201 #ifndef X86
    202 #define STATIC_BASE_ADDRESS (0x00002000+(LOWMEM_BIAS))
    203 #else
    204 #define STATIC_BASE_ADDRESS (0x00012000+(LOWMEM_BIAS))
    205 #endif
    206151
    207152#define SPJUMP_TARGET_ADDRESS (STATIC_BASE_ADDRESS+0x3000)
  • branches/qres/ccl/lisp-kernel/linuxx8664/Makefile

    r13503 r14048  
    2727# however.
    2828WFORMAT = -Wno-format
     29PLATFORM_H = platform-linuxx8664.h
    2930
    3031# If the linker supports a "--hash-style=" option, use traditional
     
    4243        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
    4344.c.o:
    44         $(CC) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m64 -o $@
     45        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m64 -o $@
    4546
    4647SPOBJ = pad.o x86-spjump64.o x86-spentry64.o x86-subprims64.o
     
    5859CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
    5960        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
    60         Threads.h x86-constants64.h x86-exceptions.h lisptypes.h
     61        Threads.h x86-constants64.h x86-exceptions.h lisptypes.h \
     62        $(PLATFORM_H) constants.h os-linux.h
    6163
    6264
  • branches/qres/ccl/lisp-kernel/lisp.h

    r13070 r14048  
    1919#define __lisp__
    2020
     21/* a platform-specific header file is pre-included via -include */
     22
     23#ifndef LOWMEM_BIAS
     24#define LOWMEM_BIAS (0)
     25#endif
    2126
    2227
    23 #include "lisptypes.h"
    24 #ifndef LOWMEM_BIAS
    25 #define LOWMEM_BIAS 0
    26 #endif
    27 
    28 #ifdef PPC
    29 #include "ppc-constants.h"
    30 #endif
    31 #ifdef X86
    32 #include "x86-constants.h"
    33 #endif
    3428#include "macros.h"
    3529
     
    6559
    6660#include "kernel-globals.h"
    67 #endif
    6861
    6962#define PLATFORM_WORD_SIZE_32 0
     
    7265#define PLATFORM_CPU_SPARC (1<<3)
    7366#define PLATFORM_CPU_X86 (2<<3)
     67#define PLATFORM_CPU_ARM (3<<3)
    7468#define PLATFORM_OS_VXWORKS 0
    7569#define PLATFORM_OS_LINUX 1
     
    7973#define PLATFORM_OS_WINDOWS 5
    8074
    81 #ifdef LINUX
    82 #define PLATFORM_OS PLATFORM_OS_LINUX
    83 #endif
    8475
    85 #ifdef DARWIN
    86 #define PLATFORM_OS PLATFORM_OS_DARWIN
    87 #endif
    88 
    89 #ifdef FREEBSD
    90 #define PLATFORM_OS PLATFORM_OS_FREEBSD
    91 #endif
    92 
    93 #ifdef SOLARIS
    94 #define PLATFORM_OS PLATFORM_OS_SOLARIS
    95 #endif
    96 
    97 #ifdef WINDOWS
    98 #define PLATFORM_OS PLATFORM_OS_WINDOWS
    99 #endif
    100 
    101 #ifdef PPC
    102 #define PLATFORM_CPU PLATFORM_CPU_PPC
    103 #endif
    104 
    105 #ifdef X86
    106 #define PLATFORM_CPU PLATFORM_CPU_X86
    107 #endif
    108 
    109 #if (WORD_SIZE == 32)
    110 #define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    111 #endif
    112 
    113 #if (WORD_SIZE == 64)
    114 #define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    115 #endif
    11676
    11777#define PLATFORM (PLATFORM_OS|PLATFORM_CPU|PLATFORM_WORD_SIZE)
     
    13292
    13393extern FILE *dbgout;
     94
     95#endif /* __lisp__ */
  • branches/qres/ccl/lisp-kernel/lisptypes.h

    r13303 r14048  
    1919#define __lisptypes__
    2020
    21 #include <sys/types.h>
    22 #define WORD_SIZE 32
    23 #ifdef PPC64
    24 #undef WORD_SIZE
    25 #define WORD_SIZE 64
    26 #endif
    27 #ifdef X8664
    28 #undef WORD_SIZE
    29 #define WORD_SIZE 64
    30 #endif
    31 
    32 
    33 #ifdef WINDOWS
    34 #include <windows.h>
    35 typedef long long s64_t;
    36 typedef unsigned long long u64_t;
    37 typedef signed long s32_t;
    38 typedef unsigned long u32_t;
    39 typedef signed short s16_t;
    40 typedef unsigned short u16_t;
    41 typedef signed char s8_t;
    42 typedef unsigned char u8_t;
    43 #else
    44 
    45 #include <stdint.h>
    46 
    47 #ifdef SOLARIS
    48 /* Solaris doesn't laugh and play like the other children */
    49 typedef int64_t s64_t;
    50 typedef uint64_t u64_t;
    51 typedef int32_t s32_t;
    52 typedef uint32_t u32_t;
    53 typedef int16_t s16_t;
    54 typedef uint16_t u16_t;
    55 typedef int8_t s8_t;
    56 typedef uint8_t u8_t;
    57 #else
    58 typedef int64_t s64_t;
    59 typedef u_int64_t u64_t;
    60 typedef int32_t s32_t;
    61 typedef u_int32_t u32_t;
    62 typedef int16_t s16_t;
    63 typedef u_int16_t u16_t;
    64 typedef int8_t s8_t;
    65 typedef u_int8_t u8_t;
    66 #endif
    67 #endif
    6821
    6922#if WORD_SIZE == 64
     
    7932#endif
    8033
    81 
    82 #ifdef DARWIN
    83 #include <sys/signal.h>
    84 #include <sys/ucontext.h>
    85 #include <AvailabilityMacros.h>
    86 
    87 #ifdef PPC
    88 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
    89 #define __ss ss
    90 #define __es es
    91 #define __fs fs
    92 
    93 #define __srr0 srr0
    94 #define __srr1 srr1
    95 #define __r0 r0
    96 #define __r1 r1
    97 #define __r3 r3
    98 #define __r4 r4
    99 #define __r5 r5
    100 #define __r6 r6
    101 #define __r13 r13
    102 #define __cr cr
    103 #define __xer xer
    104 #define __lr lr
    105 #define __ctr ctr
    106 
    107 #define __dar dar
    108 #define __dsisr dsisr
    109 #define __exception exception
    110 
    111 #define __fpregs fpregs
    112 #define __fpscr fpscr
    113 #endif
    114 
    115 #if WORD_SIZE == 64
    116 #ifdef _STRUCT_UCONTEXT64
    117 typedef _STRUCT_UCONTEXT64 ExceptionInformation;
    118 typedef _STRUCT_MCONTEXT64 *MCONTEXT_T;
    119 #else /* _STRUCT_UCONTEXT64 */
    120 typedef struct ucontext64 ExceptionInformation;
    121 typedef struct mcontext64 *MCONTEXT_T;
    122 #endif /* _STRUCT_UCONTEXT64 */
    123 #define UC_MCONTEXT(UC) UC->uc_mcontext64
    124 #else /* WORD_SIZE */
    125 #ifdef _STRUCT_UCONTEXT
    126 typedef _STRUCT_UCONTEXT ExceptionInformation;
    127 typedef _STRUCT_MCONTEXT *MCONTEXT_T;
    128 #else
    129 typedef struct ucontext ExceptionInformation;
    130 typedef struct mcontext *MCONTEXT_T;
    131 #endif
    132 #define UC_MCONTEXT(UC) UC->uc_mcontext
    133 #endif /* WORD_SIZE */
    134 
    135 
    136 
    137 #endif /* PPC */
    138 
    139 #ifdef X8664
    140 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
    141 /* Broken <i386/ucontext.h> in Mac OS 10.4u SDK */
    142 struct mcontext64 {
    143         x86_exception_state64_t __es;
    144         x86_thread_state64_t    __ss;   
    145         x86_float_state64_t     __fs;
    146 };
    147 
    148 typedef struct mcontext64 *MCONTEXT_T;
    149 typedef ucontext64_t ExceptionInformation;
    150 #define UC_MCONTEXT(UC) UC->uc_mcontext64
    151 #define __rax rax
    152 #define __fpu_mxcsr fpu_mxcsr
    153 #define __fpu_xmm0 fpu_xmm0
    154 #define __rsp rsp
    155 #define __trapno trapno
    156 #define __faultvaddr faultvaddr
    157 #define __err err
    158 #define __rip rip
    159 #define __rsi rsi
    160 #define __rdi rdi
    161 #define __rdx rdx
    162 #define __rcx rcx
    163 #define __r8 r8
    164 #define __rflags rflags
    165 #else /* post-10.4 */
    166 typedef mcontext_t MCONTEXT_T;
    167 typedef ucontext_t ExceptionInformation;
    168 #define UC_MCONTEXT(UC) UC->uc_mcontext
    169 #endif
    170 #endif
    171 
    172 #ifdef X8632
    173 /* Assume rational <i386/ucontext.h> */
    174 /* Sadly, we can't make that assumption, since Apple renamed things
    175    for Leopard. Yow!  Are we standards-compliant yet ? */
    176 /* In the long term, we probably want to use the leopard-compliant
    177    names (with leading __ prefixes).  In the shorter term, we want
    178    kernels compiled on Leopard to run on Tiger (and not reference
    179    foo$UNIX2003 and similar nonsense, and that means getting the old
    180    names (without leading __ prefixes.)  Confused yet ? */
    181 
    182 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
    183 #define __ss ss
    184 #define __ds ds
    185 #define __es es
    186 #define __cs cs
    187 #define __fs fs
    188 #define __gs gs
    189 #define __eax eax
    190 #define __esp esp
    191 #define __eip eip
    192 #define __eflags eflags
    193 #define __fpu_xmm0 fpu_xmm0
    194 #define __fpu_mxcsr fpu_mxcsr
    195 #define __fpu_stmm0 fpu_stmm0
    196 #define __trapno trapno
    197 #define __err err
    198 #define __faultvaddr faultvaddr
    199 #endif
    200 
    201 #define UC_MCONTEXT(UC) UC->uc_mcontext
    202 typedef mcontext_t MCONTEXT_T;
    203 typedef ucontext_t ExceptionInformation;
    204 #endif
    205 
    206 #endif /* #ifdef DARWIN */
    207 
    208 #ifdef LINUX
    209 typedef struct ucontext ExceptionInformation;
    210 #endif
    211 
    212 #ifdef FREEBSD
    213 typedef struct __ucontext ExceptionInformation;
    214 #endif
    215 
    216 #ifdef SOLARIS
    217 typedef struct ucontext ExceptionInformation;
    218 #endif
    219 
    220 #ifdef WINDOWS
    221 typedef CONTEXT ExceptionInformation;
    222 #endif
    22334
    22435typedef u32_t lisp_char_code;
  • branches/qres/ccl/lisp-kernel/macros.h

    r13070 r14048  
    9191#define TCR_INTERRUPT_LEVEL(tcr) \
    9292  (((signed_natural *)((tcr)->tlb_pointer))[INTERRUPT_LEVEL_BINDING_INDEX])
    93 #endif
    9493
    9594#ifdef WINDOWS
     
    115114#define DECIMAL "%ld"
    116115#endif
     116
     117#endif /* __macros __ */
  • branches/qres/ccl/lisp-kernel/platform-darwinppc64.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
     23/* ucontext/mcontext stuff; saner if OS >= 10.5 */
     24#include <sys/signal.h>
     25#include <sys/ucontext.h>
     26typedef _STRUCT_UCONTEXT64 ExceptionInformation;
     27typedef _STRUCT_MCONTEXT64 *MCONTEXT_T;
     28#define UC_MCONTEXT(UC) UC->uc_mcontext64
    1929
    2030
    21 /* ucontext/mcontext stuff; saner if OS >= 10.5 */
    22 typedef struct ucontext64 ExceptionInformation;
    23 typedef struct mcontext64 MCONTEXT_T;
    24 #define UC_MCONTEXT(UC) UC->uc_mcontext
     31#include "standard-inttypes.h"
    2532
    26 /* Define "standard" C integer types.  There are lots of standards; we
    27    basically want to define signed/unsigned 8/16/32/64-bit integer
    28    types (s8_t, u32_t) with names that we can use consistently in
    29    this code.  (We may or may not actually use them consistently.)
    30  */
     33#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
     34#define IMAGE_BASE_ADDRESS 0x300000000000L
    3135
    32 #include "standard-inttypes.h"
     36#include "lisptypes.h"
     37#include "ppc-constants64.h"
     38
     39
     40/* xp accessors.  Logically identical on darwinppc32/64. */
     41#define xpGPRvector(x) (&(UC_MCONTEXT(x)->__ss.__r0))
     42#define xpGPR(x,gprno) ((xpGPRvector(x))[gprno])
     43#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (UInt32)(new)
     44#define xpPC(x) (*((pc*) &(UC_MCONTEXT(x)->__ss.__srr0)))
     45#define set_xpPC(x,new) (xpPC(x) = (pc)(new))
     46#define xpLR(x) (*((pc*)(&(UC_MCONTEXT(x)->__ss.__lr))))
     47#define xpCTR(x) (*(pc*)(&(UC_MCONTEXT(x)->__ss.__ctr)))
     48#define xpXER(x) (UC_MCONTEXT(x)->__ss.__xer)
     49#define xpCCR(x) (UC_MCONTEXT(x)->__ss.__cr)
     50#define xpMSR(x) (UC_MCONTEXT(x)->__ss.__srr1)
     51#define xpDSISR(x) (UC_MCONTEXT(x)->__es.__dsisr)
     52#define xpDAR(x) (UC_MCONTEXT(x)->__es.__dar)
     53#define xpTRAP(x) (UC_MCONTEXT(x)->__es.__exception)
     54#define xpFPSCR(x) (UC_MCONTEXT(x)->__fs.__fpscr)
     55#define xpFPRvector(x) (UC_MCONTEXT(x)->__fs.__fpregs)
     56#define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
     57
     58/* Late versions of OSX 10.2 had a bug in 32-bit exception handling;
     59   machine context wasn't restored correctly if it wasn't modified
     60   by the exception handler.  DarwinSigReturn() was a macro that
     61   tried to work around this.
     62*/
     63#define DarwinSigReturn(x)
     64
     65/* On some platforms, we may need to do something more than returning
     66   from a signal handler in order to return to the kernel and let it
     67   restore context.  On DarwinPPC, that's not a factor.
     68*/
     69#define SIGRETURN(context)
     70
     71#include "os-darwin.h"
  • branches/qres/ccl/lisp-kernel/platform-darwinx8632.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023/* ucontext/mcontext stuff; saner if OS >= 10.5 */
     
    2831#include "standard-inttypes.h"
    2932
     33#define MAXIMUM_MAPPABLE_MEMORY ((1U<<31)-2*heap_segment_size)
     34#define IMAGE_BASE_ADDRESS 0x04000000
     35
     36#include "lisptypes.h"
     37#include "x86-constants32.h"
     38
     39
     40/* xp accessors, sigreturn stuff */
     41#define DARWIN_USE_PSEUDO_SIGRETURN 1
     42#define DarwinSigReturn(context) do {\
     43    darwin_sigreturn(context);\
     44    Bug(context,"sigreturn returned");\
     45  } while (0)
     46
     47#define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss)))
     48#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     49#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     50#define xpPC(x) (xpGPR(x,Iip))
     51#define eflags_register(xp) xpGPR(xp,Iflags)
     52#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
     53#define xpMMXvector(x) (&(UC_MCONTEXT(x)->__fs.__fpu_stmm0))
     54/* Note that this yields only the lower half of the MMX reg on x8632 */
     55#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
     56
     57#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler fakes that */
     58#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno == 0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)==2))
     59#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.__trapno == 0xe)
     60/* The x86 version of sigreturn just needs the context argument; the
     61   hidden, magic "flavor" argument that sigtramp uses is ignored. */
     62#define SIGRETURN(context) DarwinSigReturn(context)
     63
     64#include <mach/mach.h>
     65#include <mach/mach_error.h>
     66#include <mach/machine/thread_state.h>
     67#include <mach/machine/thread_status.h>
     68
     69pthread_mutex_t *mach_exception_lock;
     70
     71#include "os-darwin.h"
  • branches/qres/ccl/lisp-kernel/platform-darwinx8664.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_DARWIN
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
    1923
    2024#include <sys/signal.h>
     
    2731
    2832#include "standard-inttypes.h"
     33
     34#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
     35#define IMAGE_BASE_ADDRESS 0x300000000000L
     36
     37#include "lisptypes.h"
     38#include "x86-constants64.h"
  • branches/qres/ccl/lisp-kernel/platform-linuxppc.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2326
    2427
     28#define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
     29#define IMAGE_BASE_ADDRESS 0x31000000
    2530
     31#include "lisptypes.h"
     32#include "ppc-constants32.h"
     33
     34/* xp accessors.  Logically identical on linuxppc32/64. */
     35#define XP_PTREGS(x) ((x)->uc_mcontext.regs)
     36#define xpGPRvector(x) ((natural *)(XP_PTREGS(x)))
     37#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     38#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     39#define xpPC(x) (*((pc*)(&(XP_PTREGS(x)->nip))))
     40#define set_xpPC(x,new) (xpPC(x) = (pc)(new))
     41#define xpLR(x) (*((pc*)(&(XP_PTREGS(x)->link))))
     42#define xpCTR(x) (*(pc*)(&(XP_PTREGS(x)->ctr)))
     43#define xpXER(x) (XP_PTREGS(x)->xer)
     44#define xpCCR(x) (XP_PTREGS(x)->ccr)
     45#define xpMSR(x) (XP_PTREGS(x)->msr)
     46#define xpDSISR(x) (XP_PTREGS(x)->dsisr)
     47#define xpDAR(x) (XP_PTREGS(x)->dar)
     48#define xpTRAP(x) (XP_PTREGS(x)->trap)
     49#define xpFPSCR(x) (XP_PTREGS(x)->gpr[PT_FPSCR])
     50#define xpFPRvector(x) ((double *)(&(XP_PTREGS(x)->gpr[PT_FPR0])))
     51#define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
     52
     53/*
     54   Work around a Darwin G5 bug (present in OSX 10.2.7, 10.2.8, and later
     55   versions.  See platform-darwinppc*.h for details
     56*/
     57#define DarwinSigReturn(context)
     58#define SIGRETURN(context)
     59
     60#include "os-linux.h"
  • branches/qres/ccl/lisp-kernel/platform-linuxppc64.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_PPC
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2225#include "standard-inttypes.h"
    2326
     27#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
     28#define IMAGE_BASE_ADDRESS 0x50000000000L
    2429
     30#include "lisptypes.h"
     31#include "ppc-constants64.h"
    2532
     33/* xp accessors.  Logically identical on linuxppc32/64. */
     34#define XP_PTREGS(x) ((x)->uc_mcontext.regs)
     35#define xpGPRvector(x) ((natural *)(XP_PTREGS(x)))
     36#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     37#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     38#define xpPC(x) (*((pc*)(&(XP_PTREGS(x)->nip))))
     39#define set_xpPC(x,new) (xpPC(x) = (pc)(new))
     40#define xpLR(x) (*((pc*)(&(XP_PTREGS(x)->link))))
     41#define xpCTR(x) (*(pc*)(&(XP_PTREGS(x)->ctr)))
     42#define xpXER(x) (XP_PTREGS(x)->xer)
     43#define xpCCR(x) (XP_PTREGS(x)->ccr)
     44#define xpMSR(x) (XP_PTREGS(x)->msr)
     45#define xpDSISR(x) (XP_PTREGS(x)->dsisr)
     46#define xpDAR(x) (XP_PTREGS(x)->dar)
     47#define xpTRAP(x) (XP_PTREGS(x)->trap)
     48#define xpFPSCR(x) (XP_PTREGS(x)->gpr[PT_FPSCR])
     49#define xpFPRvector(x) ((double *)(&(XP_PTREGS(x)->gpr[PT_FPR0])))
     50#define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
     51
     52/*
     53   Work around a Darwin G5 bug (present in OSX 10.2.7, 10.2.8, and later
     54   versions.  See platform-darwinppc*.h for details
     55*/
     56#define DarwinSigReturn(context)
     57#define SIGRETURN(context)
     58
     59#include "os-linux.h"
  • branches/qres/ccl/lisp-kernel/platform-linuxx8632.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2326
    2427
     28#define MAXIMUM_MAPPABLE_MEMORY (9U<<28)
     29#define IMAGE_BASE_ADDRESS 0x10000000
    2530
     31#include "lisptypes.h"
     32#include "x86-constants32.h"
     33
     34/* xp accessors */
     35#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext.gregs)))
     36#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     37#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     38#define xpPC(x) (xpGPR(x,Iip))
     39#define xpMMXreg(x,n)  *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
     40#define eflags_register(xp) xpGPR(xp,Iflags)
     41#define SIGNUM_FOR_INTN_TRAP SIGSEGV
     42#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)==0xd)&&((xpGPR(xp,REG_ERR)&7)==2))
     43#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)==0xe)
     44#define SIGRETURN(context)
     45
     46#include "os-linux.h"
  • branches/qres/ccl/lisp-kernel/platform-linuxx8664.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_LINUX
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2225#include "standard-inttypes.h"
    2326
     27#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
     28#define IMAGE_BASE_ADDRESS 0x300000000000L
    2429
     30#include "lisptypes.h"
     31#include "x86-constants64.h"
    2532
     33#include "os-linux.h"
  • branches/qres/ccl/lisp-kernel/platform-solarisx64.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_SOLARIS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2225#include "solaris-inttypes.h"
    2326
     27#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
     28#define IMAGE_BASE_ADDRESS 0x300000000000L
    2429
    25 
     30#include "lisptypes.h"
     31#include "x86-constants64.h"
  • branches/qres/ccl/lisp-kernel/platform-solarisx86.h

    r13597 r14048  
    1717
    1818#define WORD_SIZE 32
     19#define PLATFORM_OS PLATFORM_OS_SOLARIS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
    1922
    2023typedef struct ucontext ExceptionInformation;
     
    2225#include "solaris-inttypes.h"
    2326
     27#define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
     28#define IMAGE_BASE_ADDRESS 0x10000000
    2429
     30#include "lisptypes.h"
     31#include "x86-constants32.h"
    2532
     33#define xpGPRvector(x) ((x)->uc_mcontext.gregs)
     34#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     35#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     36#define xpPC(x) xpGPR(x,Iip)
     37#define eflags_register(xp) xpGPR(xp,Iflags)
     38#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[0]))
     39#define xpMMXreg(x,n)*(natural *)(&(((struct fnsave_state *)(&(((x)->uc_mcontext.fpregs))))->f_st[n]))
     40#define SIGNUM_FOR_INTN_TRAP SIGSEGV
     41#ifdef X8664
     42#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)==0xd)&&((xpGPR(xp,REG_ERR)&7)==2))
     43#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)==0xe)
     44#else
     45#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)==0xd)&&((xpGPR(xp,ERR)&7)==2))
     46#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)==0xe)
     47#endif
     48#define SIGRETURN(context) setcontext(context)
     49
     50#include "os-solaris.h"
  • branches/qres/ccl/lisp-kernel/platform-win64.h

    r13597 r14048  
     1/*
     2   Copyright (C) 2010 Clozure Associates
     3   Copyright (C) 1994-2001 Digitool, Inc
     4   This file is part of Clozure CL. 
     5
     6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
     7   License , known as the LLGPL and distributed with Clozure CL as the
     8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
     9   which is distributed with Clozure CL as the file "LGPL".  Where these
     10   conflict, the preamble takes precedence. 
     11
     12   Clozure CL is referenced in the preamble as the "LIBRARY."
     13
     14   The LLGPL is also available online at
     15   http://opensource.franz.com/preamble.html
     16*/
     17
     18#define WORD_SIZE 64
     19#define PLATFORM_OS PLATFORM_OS_WINDOWS
     20#define PLATFORM_CPU PLATFORM_CPU_X86
     21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
     22
     23#include <windows.h>
     24
     25typedef CONTEXT ExceptionInformation;
     26
     27#include "windows-inttypes.h"
     28
     29/* Supposedly, the high-end version of Vista allow 128GB of pageable memory */
     30#define MAXIMUM_MAPPABLE_MEMORY (512LL<<30LL)
     31#define IMAGE_BASE_ADDRESS 0x100000000LL
     32
     33#include "lisptypes.h"
     34#include "x86-constants64.h"
     35
     36#define xpGPRvector(x) ((DWORD64 *)(&(x)->Rax))
     37#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
     38#define xpPC(x) xpGPR(x,Iip)
     39#define eflags_register(xp) xp->EFlags
     40#define xpMXCSRptr(x) (DWORD *)(&(x->MxCsr))
     41
     42
     43#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Also fake */
     44#define IS_MAYBE_INT_TRAP(info,xp) \
     45  ((info->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) &&       \
     46   (info->ExceptionInformation[0]==0) &&                       \
     47   (info->ExceptionInformation[1]==(ULONG_PTR)(-1L)))
     48#define IS_PAGE_FAULT(info,xp) (1)
     49#define SIGRETURN(context)      /* for now */
     50
     51#include "os-windows.h"
  • branches/qres/ccl/lisp-kernel/pmcl-kernel.c

    r13502 r14048  
    2020    a conflict (actually I think the problem is in "constants.h")
    2121*/
    22 #include <mach-o/dyld.h>
     22/* #include <mach-o/dyld.h> */
    2323
    2424#endif
     
    363363  }
    364364}
    365 
    366 #if WORD_SIZE == 64
    367 #ifdef DARWIN
    368 #define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
    369 #endif
    370 #ifdef FREEBSD
    371 #define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
    372 #endif
    373 #ifdef SOLARIS
    374 #define MAXIMUM_MAPPABLE_MEMORY (128L<<30L)
    375 #endif
    376 #ifdef LINUX
    377 #ifdef X8664
    378 #define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
    379 #endif
    380 #ifdef PPC
    381 #define MAXIMUM_MAPPABLE_MEMORY (128L<<30L)
    382 #endif
    383 #endif
    384 #ifdef WINDOWS
    385 /* Supposedly, the high-end version of Vista allow 128GB of pageable memory */
    386 #define MAXIMUM_MAPPABLE_MEMORY (120LL<<30LL)
    387 #endif
    388 #else
    389 #ifdef DARWIN
    390 #define MAXIMUM_MAPPABLE_MEMORY ((1U<<31)-2*heap_segment_size)
    391 #endif
    392 #ifdef LINUX
    393 #ifdef X86
    394 #define MAXIMUM_MAPPABLE_MEMORY (9U<<28)
    395 #else
    396 #define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
    397 #endif
    398 #endif
    399 #ifdef WINDOWS
    400 #define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
    401 #endif
    402 #ifdef FREEBSD
    403 #define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
    404 #endif
    405 #ifdef SOLARIS
    406 #define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
    407 #endif
    408 #endif
    409365
    410366natural
  • branches/qres/ccl/lisp-kernel/ppc-constants.h

    r13070 r14048  
    1616*/
    1717
    18 #ifndef __ppc_constants__
    19 #define __ppc_constants__ 1
     18#include "constants.h"
    2019
    2120/*  Register usage: */
     
    6362#define BA_VAL  ((unsigned) ((18<<26) | (1<<1)))
    6463
    65 #define TCR_FLAG_BIT_FOREIGN fixnumshift
    66 #define TCR_FLAG_BIT_AWAITING_PRESET (fixnumshift+1)
    67 #define TCR_FLAG_BIT_ALT_SUSPEND (fixnumshift+2)
    68 #define TCR_FLAG_BIT_PROPAGATE_EXCEPTION (fixnumshift+3)
    69 #define TCR_FLAG_BIT_SUSPEND_ACK_PENDING (fixnumshift+4)
    70 #define TCR_FLAG_BIT_PENDING_EXCEPTION (fixnumshift+5)
    71 #define TCR_FLAG_BIT_FOREIGN_EXCEPTION (fixnumshift+6)
    72 #define TCR_FLAG_BIT_PENDING_SUSPEND (fixnumshift+7)
    7364
    74 #define TCR_STATE_FOREIGN (1)
    75 #define TCR_STATE_LISP    (0)
    76 #define TCR_STATE_EXCEPTION_WAIT (2)
    77 #define TCR_STATE_EXCEPTION_RETURN (4)
    78 
    79 #ifdef PPC64
    80 #include "ppc-constants64.h"
    81 #else
    82 #include "ppc-constants32.h"
    83 #endif
    84 
    85 #define dnode_size (node_size*2)
    86 #define dnode_shift (node_shift+1)
    87 
    88 #define INTERRUPT_LEVEL_BINDING_INDEX (1)
    89 
    90 #endif /* __ppc_constants__ */
     65#define STATIC_BASE_ADDRESS 0x00002000
    9166
    9267
     68
  • branches/qres/ccl/lisp-kernel/ppc-constants64.h

    r13070 r14048  
    1616*/
    1717
    18 #ifndef __constants64__
    19 #define __constants64__ 1
     18
     19#include "ppc-constants.h"
    2020
    2121#define rcontext 2
     
    453453#define log2_heap_segment_size 17L
    454454
    455 #endif
    456 
  • branches/qres/ccl/lisp-kernel/ppc-exceptions.h

    r13303 r14048  
    2525OSStatus
    2626handle_uuo(ExceptionInformation *, opcode, pc);
    27 
    28 
    29 
    30 #ifdef LINUX
    31 /*
    32   Different (recent) versions of glibc disagree about how
    33   a ucontext is laid out (and about what an mcontext is.)
    34   There's something like a pointer to a pt_regs structure
    35   in the 12th word in both cases.  (Yes, this is an extremely
    36   ugly hack; it would be better to conditionalize on the values
    37   of GLIBC_VERSION/GLIBC_MINOR , but the discrepancy exists
    38   in various flavors of glibc 2.3.)
    39 */
    40 #ifdef PPC64
    41 #define XP_PTREGS(x) ((x)->uc_mcontext.regs)
    42 #define xpGPRvector(x) ((natural *)(XP_PTREGS(x)))
    43 #else
    44 #define XP_PTREGS(x) (((struct pt_regs **)(x))[12])
    45 #define xpGPRvector(x) (XP_PTREGS(x)->gpr)
    46 #endif
    47 #define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
    48 #define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
    49 #define xpPC(x) (*((pc*)(&(XP_PTREGS(x)->nip))))
    50 #define set_xpPC(x,new) (xpPC(x) = (pc)(new))
    51 #define xpLR(x) (*((pc*)(&(XP_PTREGS(x)->link))))
    52 #define xpCTR(x) (*(pc*)(&(XP_PTREGS(x)->ctr)))
    53 #define xpXER(x) (XP_PTREGS(x)->xer)
    54 #define xpCCR(x) (XP_PTREGS(x)->ccr)
    55 #define xpMSR(x) (XP_PTREGS(x)->msr)
    56 #define xpDSISR(x) (XP_PTREGS(x)->dsisr)
    57 #define xpDAR(x) (XP_PTREGS(x)->dar)
    58 #define xpTRAP(x) (XP_PTREGS(x)->trap)
    59 #define xpFPSCR(x) (XP_PTREGS(x)->gpr[PT_FPSCR])
    60 #define xpFPRvector(x) ((double *)(&(XP_PTREGS(x)->gpr[PT_FPR0])))
    61 #define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
    62 
    63 /*
    64    Work around a Darwin G5 bug (present in OSX 10.2.7, 10.2.8, and later
    65    versions.  See below for details.
    66 */
    67 #define DarwinSigReturn(context)
    68 #define SIGRETURN(context)
    69 #endif
    70 
    71 #ifdef DARWIN
    72 #define xpGPRvector(x) (&(UC_MCONTEXT(x)->__ss.__r0))
    73 #define xpGPR(x,gprno) ((xpGPRvector(x))[gprno])
    74 #define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (UInt32)(new)
    75 #define xpPC(x) (*((pc*) &(UC_MCONTEXT(x)->__ss.__srr0)))
    76 #define set_xpPC(x,new) (xpPC(x) = (pc)(new))
    77 #define xpLR(x) (*((pc*)(&(UC_MCONTEXT(x)->__ss.__lr))))
    78 #define xpCTR(x) (*(pc*)(&(UC_MCONTEXT(x)->__ss.__ctr)))
    79 #define xpXER(x) (UC_MCONTEXT(x)->__ss.__xer)
    80 #define xpCCR(x) (UC_MCONTEXT(x)->__ss.__cr)
    81 #define xpMSR(x) (UC_MCONTEXT(x)->__ss.__srr1)
    82 #define xpDSISR(x) (UC_MCONTEXT(x)->__es.__dsisr)
    83 #define xpDAR(x) (UC_MCONTEXT(x)->__es.__dar)
    84 #define xpTRAP(x) (UC_MCONTEXT(x)->__es.__exception)
    85 #define xpFPSCR(x) (UC_MCONTEXT(x)->__fs.__fpscr)
    86 #define xpFPRvector(x) (UC_MCONTEXT(x)->__fs.__fpregs)
    87 #define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
    88 /* There's a bug in some versions of Darwin on G5 processors: FP context
    89    isn't restored correctly on exit from a signal handler if the integer
    90    context appears to be unmodified (the 64-bit context isn't set up
    91    correctly by the kernel: only the first N bytes are copied out of
    92    the kernel, where N = size of 32-bit context.
    93 
    94    If the kernel pushed both a 32-bit and 64-bit context, the C
    95    runtime "signal trampoline" code tries to determine if the 32-bit
    96    GPRs and user-visible SPRs in the 32-bit context contain the same
    97    values as their 64-bit counterparts on exit; if so, it tries to
    98    call sigreturn with an extra argument that indicates that the
    99    thread's state should be restored from the 64-bit context.
    100    (Apparently that's more efficient; it'd be surprising if it'd be
    101    more efficent when the cost of comparing values in the two contexts
    102    is factored in ...).  On some OS releases, the 64-bit context can't
    103    be reliably restored (FPRs get trashed.)
    104 
    105    One way to work around this is to use a deprecated, 32-bit-context-only
    106    version of the sigreturn syscall.  There seems to be reason to be
    107    reason to believe that the old sigreturn syscall will disappear
    108    on OS releases >10.3.
    109 
    110    Another way to work around this is to make a "harmless" change to
    111    an SPR or GPR value in the 32-bit context.  There are lots of
    112    "reserved" bits in the XER that make good candidates: 1's written
    113    to reserved XER bits can't be reliably read anyway, so this may
    114    or may not actually change the value in the XER in a way that
    115    can be reliably detected.
    116 
    117    Note that both the old, deprecated version of sigreturn and the
    118    new version take a first argument of type "struct ucontext *",
    119    not "struct sigcontext *" as the man page and header files claim.
    120    The new version takes a second argument, which is a small integer
    121    which defines what "flavor" of context should be restored from.
    122    The meaningful values that can be used here aren't defined in
    123    a header file; the kernel (and the libc _sigtramp() function)
    124    have (hopefully) matching, redundant hardwired definitions in
    125    the source.
    126 */
    127 #ifdef PPC64
    128 #define DarwinSigReturn(x)
    129 #else
    130 #define DarwinSigReturn(x) (UC_MCONTEXT(x)->__ss.__xer)^=0x80
    131 #endif
    132 #define SIGRETURN(context) DarwinSigReturn(context)
    133 #endif
    134 
    135 
    136 
    13727
    13828
  • branches/qres/ccl/lisp-kernel/solaris-inttypes.h

    r13596 r14048  
    2121*/
    2222
     23#include <sys/types.h>
    2324#include <stdint.h>
    2425typedef int64_t s64_t;
  • branches/qres/ccl/lisp-kernel/unix-calls.c

    r13070 r14048  
    2626*/
    2727
    28 #define _LARGEFILE64_SOURCE
     28#ifndef _LARGEFILE64_SOURCE_
     29#define _LARGEFILE64_SOURCE_
     30#endif
    2931#include <errno.h>
    3032#include <unistd.h>
  • branches/qres/ccl/lisp-kernel/x86-constants.h

    r13070 r14048  
    1515*/
    1616
    17 #ifndef __x86_constants__
    18 #define __x86_constants__ 1
     17#include "constants.h"
    1918
    20 #define TCR_FLAG_BIT_FOREIGN fixnumshift
    21 #define TCR_FLAG_BIT_AWAITING_PRESET (fixnumshift+1)
    22 #define TCR_FLAG_BIT_ALT_SUSPEND (fixnumshift+2)
    23 #define TCR_FLAG_BIT_PROPAGATE_EXCEPTION (fixnumshift+3)
    24 #define TCR_FLAG_BIT_SUSPEND_ACK_PENDING (fixnumshift+4)
    25 #define TCR_FLAG_BIT_PENDING_EXCEPTION (fixnumshift+5)
    26 #define TCR_FLAG_BIT_FOREIGN_EXCEPTION (fixnumshift+6)
    27 #define TCR_FLAG_BIT_PENDING_SUSPEND (fixnumshift+7)
    28 #define TCR_STATE_FOREIGN (1)
    29 #define TCR_STATE_LISP    (0)
    30 #define TCR_STATE_EXCEPTION_WAIT (2)
    31 #define TCR_STATE_EXCEPTION_RETURN (4)
    32 
    33 #ifdef X8664
    34 #include "x86-constants64.h"
    35 #else
    36 #include "x86-constants32.h"
    37 #endif
    38 
    39 #define dnode_size (node_size*2)
    40 #define dnode_shift (node_shift+1)
    41 
    42 #define INTERRUPT_LEVEL_BINDING_INDEX (1)
    4319
    4420/* FP exception mask bits */
    4521#define MXCSR_IM_BIT (7)        /* invalid masked when set*/
    46 #define MXCSR_DM_BIT (8)        /* denormals masked when set*/
     22#define MXCSR_DM_BIT (8)        /* denormals masked when set*
    4723#define MXCSR_ZM_BIT (9)        /* divide-by-zero masked when set */
    4824#define MXCSR_OM_BIT (10)       /* overflow masked when set */
     
    5935#define X86_OVERFLOW_FLAG_BIT (11)
    6036
     37#define STATIC_BASE_ADDRESS 0x00012000
    6138
    62 #endif /* __x86_constants__ */
    6339
     40
  • branches/qres/ccl/lisp-kernel/x86-constants32.h

    r12993 r14048  
     1/*
     2   Copyright (C) 2009 Clozure Associates
     3   Copyright (C) 1994-2001 Digitool, Inc
     4   This file is part of Clozure CL. 
     5
     6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
     7   License , known as the LLGPL and distributed with Clozure CL as the
     8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
     9   which is distributed with Clozure CL as the file "LGPL".  Where these
     10   conflict, the preamble takes precedence. 
     11
     12   Clozure CL is referenced in the preamble as the "LIBRARY."
     13
     14   The LLGPL is also available online at
     15   http://opensource.franz.com/preamble.html
     16*/
     17
     18#include "x86-constants.h"
     19
    120/* offsets into uc_mcontext.ss */
    221#ifdef DARWIN
  • branches/qres/ccl/lisp-kernel/x86-constants64.h

    r13070 r14048  
    1414   http://opensource.franz.com/preamble.html
    1515*/
     16
     17#include "x86-constants.h"
    1618
    1719#ifdef DARWIN
Note: See TracChangeset for help on using the changeset viewer.