source: trunk/source/lisp-kernel/platform-linuxarm.h @ 15470

Last change on this file since 15470 was 15470, checked in by gb, 7 years ago

Try to minimize Mach dependencies on Darwin; in particular, use POSIX
signal handling to handle exceptions (as is done on other *nix platforms.)

Use sigaltstack() on Darwin; it still seems to have problems, but at least
doesn't (usually) try to force all threads to use the same alt stack. (That
just never gets old somehow ...)

Lots of stuff removed; lots of (mostly small, mostly obvious) changes to
support the above.

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_LINUX
20#define PLATFORM_CPU PLATFORM_CPU_ARM
21#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
22
23typedef struct ucontext ExceptionInformation;
24
25#include "standard-inttypes.h"
26
27
28#define MAXIMUM_MAPPABLE_MEMORY (512<<20)
29#define IMAGE_BASE_ADDRESS 0x50000000
30
31#include "lisptypes.h"
32#include "arm-constants.h"
33
34/* xp accessors */
35#define xpGPRvector(x) ((natural *)&((x)->uc_mcontext.arm_r0))
36#define xpGPR(x,gprno) (xpGPRvector(x))[gprno]
37#define xpPC(x) (*((pc*)(&(xpGPR(x,15)))))
38#define xpLR(x) (*((pc*)(&(xpGPR(x,14)))))
39#define xpPSR(x) ((x)->uc_mcontext.arm_cpsr)
40#define xpFaultAddress(x) ((x)->uc_mcontext.fault_address)
41#define xpTRAP(x) ((x)->uc_mcontext.trap_no)
42#define xpERROR(x) ((x)->uc_mcontext.error_code)
43#define xpFaultStatus(x) xpERROR(x)
44
45#define DarwinSigReturn(context)
46#define SIGRETURN(context)
47
48#include "os-linux.h"
49
50#define PROTECT_CSTACK 1
51#define SEPARATE_ALTSTACK 1
Note: See TracBrowser for help on using the repository browser.