source: trunk/source/lisp-kernel/platform-linuxppc.h @ 13637

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

Move some PPC exception stuff to platform header.

File size: 2.1 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_PPC
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 (1U<<30)
29#define IMAGE_BASE_ADDRESS 0x31000000
30
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 XP_PTREGS(x) ((x)->uc_mcontext.regs)
38#define xpGPRvector(x) ((natural *)(XP_PTREGS(x)))
39#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
40#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
41#define xpPC(x) (*((pc*)(&(XP_PTREGS(x)->nip))))
42#define set_xpPC(x,new) (xpPC(x) = (pc)(new))
43#define xpLR(x) (*((pc*)(&(XP_PTREGS(x)->link))))
44#define xpCTR(x) (*(pc*)(&(XP_PTREGS(x)->ctr)))
45#define xpXER(x) (XP_PTREGS(x)->xer)
46#define xpCCR(x) (XP_PTREGS(x)->ccr)
47#define xpMSR(x) (XP_PTREGS(x)->msr)
48#define xpDSISR(x) (XP_PTREGS(x)->dsisr)
49#define xpDAR(x) (XP_PTREGS(x)->dar)
50#define xpTRAP(x) (XP_PTREGS(x)->trap)
51#define xpFPSCR(x) (XP_PTREGS(x)->gpr[PT_FPSCR])
52#define xpFPRvector(x) ((double *)(&(XP_PTREGS(x)->gpr[PT_FPR0])))
53#define xpFPR(x,fprno) (xpFPRvector(x)[fprno])
54
55/*
56   Work around a Darwin G5 bug (present in OSX 10.2.7, 10.2.8, and later
57   versions.  See platform-darwinppc*.h for details
58*/
59#define DarwinSigReturn(context)
60#define SIGRETURN(context)
Note: See TracBrowser for help on using the repository browser.