source: trunk/source/lisp-kernel/platform-freebsdx8664.h @ 13638

Last change on this file since 13638 was 13638, checked in by gb, 10 years ago

Move more PPC exception stuff, x86 exception stuff to platform heeaders.
Introduce OS headers; so far, just signal constants. Include the applicable
os-*.h in platform-*.h.
Ensure that Makefiles have constants.h, os*.h in CHEADERS.
Will try to smoke-test & fix typos before sleeping.

File size: 1.8 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 64
19#define PLATFORM_OS PLATFORM_OS_FREEBSD
20#define PLATFORM_CPU PLATFORM_CPU_X86
21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
22
23typedef struct __ucontext ExceptionInformation;
24
25#include "standard-inttypes.h"
26
27#define MAXIMUM_MAPPABLE_MEMORY (512L<<30L)
28#define IMAGE_BASE_ADDRESS 0x300000000000L
29
30#include "lisptypes.h"
31#include "x86-constants64.h"
32
33#include <machine/fpu.h>
34#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext)))
35#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
36#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
37#define eflags_register(xp) xpGPR(xp,Iflags)
38#define xpPC(x) xpGPR(x,Iip)
39#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
40#define xpXMMregs(x)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
41extern void freebsd_sigreturn(ExceptionInformation *);
42#define SIGNUM_FOR_INTN_TRAP SIGBUS
43#define IS_MAYBE_INT_TRAP(info,xp) ((xp->uc_mcontext.mc_trapno == T_PROTFLT) && ((xp->uc_mcontext.mc_err & 7) == 2))
44#define IS_PAGE_FAULT(info,xp) (xp->uc_mcontext.mc_trapno == T_PAGEFLT)
45#define SIGRETURN(context) freebsd_sigreturn(context)
46
47#include "os-freebsd.h"
Note: See TracBrowser for help on using the repository browser.