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

Last change on this file since 16083 was 14189, checked in by gb, 9 years ago

Define xpFaultStatus (to access the fault status register copy in
a signal context.)

File size: 1.5 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_DARWIN
20#define PLATFORM_CPU PLATFORM_CPU_ARM
21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
22
23#include <sys/signal.h>
24#include <sys/ucontext.h>
25
26typedef ucontext_t ExceptionInformation;
27
28#include "standard-inttypes.h"
29
30
31#define MAXIMUM_MAPPABLE_MEMORY (256<<20) /* uh, no */
32#define IMAGE_BASE_ADDRESS 0x04001000
33
34#include "lisptypes.h"
35#include "arm-constants.h"
36
37#define UC_MCONTEXT(UC) UC->uc_mcontext
38
39/* xp accessors */
40#define xpGPRvector(x) ((natural *)&((x)->uc_mcontext->__ss.__r[0]))
41#define xpGPR(x,gprno) (xpGPRvector(x))[gprno]
42#define xpPC(x) (*((pc*)(&(xpGPR(x,15)))))
43#define xpLR(x) (*((pc*)(&(xpGPR(x,14)))))
44#define xpPSR(x) xpGPR(x,16)
45#define xpFaultAddress(x) ((x)->uc_mcontext->__es.__far)
46#define xpFaultStatus(x)  ((x)->uc_mcontext->__es.__fsr)
47
48
49#define DarwinSigReturn(context)
50#define SIGRETURN(context)
51
52#include "os-darwin.h"
53
Note: See TracBrowser for help on using the repository browser.