2
$Id: sig_cpu.inc,v 1.2 2004/01/08 21:52:34 jonas Exp $
3
Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
5
@APPLE_LICENSE_HEADER_START@
7
The contents of this file constitute Original Code as defined in and
8
are subject to the Apple Public Source License Version 1.1 (the
9
"License"). You may not use this file except in compliance with the
10
License. Please obtain a copy of the License at
11
http://www.apple.com/publicsource and read it before using this file.
13
This Original Code and all software distributed under the License are
14
distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17
FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18
License for the specific language governing rights and limitations
21
@APPLE_LICENSE_HEADER_END@
24
Copyright (c) 1992, 1993 NeXT Computer, Inc.
28
Machine specific signal information.
31
25-MAR-97 Umesh Vaishampayan (umeshv@NeXT.com)
32
Ported from m98k and hppa.
34
13-Jan-92 Peter King (king) at NeXT Computer, Inc.
35
Filled out struct sigcontext to hold all registers.
36
Added regs_saved_t to specify which regs stored in the
39
09-Nov-92 Ben Fathi (benf) at NeXT, Inc.
42
09-May-91 Mike DeMoney (mike) at NeXT, Inc.
53
sig_atomic_t = longint;
55
Machine-dependant flags used in sigvec call.
57
{ Save all regs in sigcontext }
62
regs_saved_t -- Describes which registers beyond what the kernel cares
63
about are saved to and restored from this sigcontext.
65
The default is REGS_SAVED_CALLER, only the caller saved registers
66
are saved. If the SV_SAVE_REGS flag was set when the signal
67
handler was registered with sigvec() then all the registers will be
68
saved in the sigcontext, and REGS_SAVED_ALL will be set. The C
69
library uses REGS_SAVED_NONE in order to quickly restore kernel
70
state during a longjmp().
72
{ Only kernel managed regs restored }
73
{ "Caller saved" regs: rpc, a0-a7,
74
t0-t4, at, lk0-lk1, xt1-xt20,
80
{ Structure used in sigstack call. }
81
tdarwin_stack_t = record
82
ss_sp : pchar; { signal stack base }
83
ss_size : cint; { signal stack length }
84
ss_flags : cint; { SA_DISABLE and/or SA_ONSTACK }
87
ppc_thread_state = record
88
{ Instruction address register (PC) }
90
{ Machine state register (supervisor) }
124
{ Condition register }
126
{ User's integer exception register }
132
{ MQ register (601 only) }
134
{ Vector Save Register }
137
ppc_thread_state_t = ppc_thread_state;
140
ppc_thread_state64 = record
181
ppc_thread_state64_t = ppc_thread_state64;
185
{ This structure should be double-word aligned for performance }
188
ppc_float_state = record
189
fpregs : array[0..31] of double;
190
{ fpscr is 64 bits, 32 bits of rubbish }
192
{ floating point status register }
195
ppc_float_state_t = ppc_float_state;
197
{ VRs that have been saved }
198
ppc_vector_state = record
199
save_vr : array[0..31] of array[0..3] of dword;
200
save_vscr : array[0..3] of dword;
201
save_pad5 : array[0..3] of dword;
202
save_vrvalid : dword;
203
save_pad6 : array[0..6] of dword;
205
ppc_vector_state_t = ppc_vector_state;
210
This structure corresponds to some additional state of the user
211
registers as saved in the PCB upon kernel entry. They are only
212
available if an exception is passed out of the kernel, and even
213
then not all are guaranteed to be updated.
215
Some padding is included in this structure which allows space for
216
servers to store temporary values if need be, to maintain binary
222
ppc_exception_state = record
223
{ Fault registers for coredump }
226
{ number of powerpc exception taken }
228
{ align to 16 bytes }
230
{ space in PCB "just in case" }
231
pad1 : array[0..3] of dword;
233
ppc_exception_state_t = ppc_exception_state;
239
ppc_exception_state64 = record
240
{ Fault registers for coredump }
243
{ number of powerpc exception taken }
245
{ space in PCB "just in case" }
246
pad1 : array[0..3] of dword;
248
ppc_exception_state64_t = ppc_exception_state64;
253
es: ppc_exception_state_t;
254
ss: ppc_thread_state_t;
255
fs: ppc_float_state_t;
256
vs: ppc_vector_state_t;
259
psigcontextrec = ^sigcontextrec;
260
sigcontextrec = record
262
uc_sigmask : sigset_t; { signal mask used by this context }
263
uc_stack : tdarwin_stack_t; { stack used by this context }
264
uc_link : psigcontextrec; { pointer to resuming context }
265
uc_mcsize : size_t; { size of the machine context passed in }
266
uc_mcontext: ^mcontext_t; { machine specific context }
270
$Log: sig_cpu.inc,v $
271
Revision 1.2 2004/01/08 21:52:34 jonas
272
* fixed signal handling under 10.3.2, still have to verify whether it's
275
Revision 1.1 2004/01/04 20:05:38 jonas
276
* first working version of the Darwin/Mac OS X (for PowerPC) RTL
277
Several non-essential units are still missing, but make cycle works
279
Revision 1.1 2002/09/08 09:01:48 jonas
b'\\ No newline at end of file'