source: release/1.9/source/lisp-kernel/platform-solarisx86.h @ 16083

Last change on this file since 16083 was 15147, checked in by gb, 8 years ago

At least for x86: move some platform-specific constants (register indices)
from x86-constants*.h to platform-*.h. What a concept.

File size: 2.0 KB
Line 
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 32
19#define PLATFORM_OS PLATFORM_OS_SOLARIS
20#define PLATFORM_CPU PLATFORM_CPU_X86
21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
22
23typedef struct ucontext ExceptionInformation;
24
25#include "solaris-inttypes.h"
26
27#define MAXIMUM_MAPPABLE_MEMORY (1U<<30)
28#define IMAGE_BASE_ADDRESS 0x10000000
29
30#include "lisptypes.h"
31#include "x86-constants32.h"
32
33#include <sys/regset.h>
34#include <limits.h>
35#define REG_EAX EAX
36#define REG_EBX EBX
37#define REG_ECX ECX
38#define REG_EDX EDX
39#define REG_ESI ESI
40#define REG_EDI EDI
41#define REG_EBP EBP
42#define REG_ESP UESP    /* Maybe ... ESP is often 0, but who knows why ? */
43#define REG_EFL EFL
44#define REG_EIP EIP
45
46#define xpGPRvector(x) ((x)->uc_mcontext.gregs)
47#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
48#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
49#define xpPC(x) xpGPR(x,Iip)
50#define eflags_register(xp) xpGPR(xp,Iflags)
51#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[0]))
52#define xpMMXreg(x,n)*(natural *)(&(((struct fnsave_state *)(&(((x)->uc_mcontext.fpregs))))->f_st[n]))
53#define xmMXCSR(x) ((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr)
54#define SIGNUM_FOR_INTN_TRAP SIGSEGV
55#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)==0xd)&&((xpGPR(xp,ERR)&7)==2))
56#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)==0xe)
57#define SIGRETURN(context) setcontext(context)
58
59#include "os-solaris.h"
Note: See TracBrowser for help on using the repository browser.