1{
2    This file is part of the Free Pascal run time library.
3    Copyright (c) 1999-2000 by Jonas Maebe,
4    member of the Free Pascal development team.
5
6    TSigContext and associated structures.
7
8    See the file COPYING.FPC, included in this distribution,
9    for details about the copyright.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15 **********************************************************************}
16
17{$packrecords C}
18
19type
20  TAarch64_ctx = record
21    magic,
22    size : DWord
23  end;
24
25  TFPSIMD_Context = record
26    head : TAarch64_ctx;
27    fpsr,
28    fpcr : DWord;
29    vregs : array[0..31] of array[0..7] of Byte;
30  end;
31
32  PSigContext = ^TSigContext;
33  TSigContext = record
34    fault_address : cULong;
35    regs : array[0..30] of cULong;
36    sp : cULong;
37    pc : cULong;
38    pstate : cULong;
39    __pad : cULong;
40    { The following fields should be 16-byte-aligned. Currently the
41      directive for specifying alignment is buggy, so the preceding
42      field was added so that the record has the right size. }
43    case Byte of
44      1: (__reserved : array[0..4095] of cUChar);
45      2: (FPSIMD_Context : TFPSIMD_Context);
46  end;
47
48  stack_t = record
49    ss_sp : pointer;
50    ss_flags : cInt;
51    ss_size : size_t;
52  end;
53
54  PUContext = ^TUContext;
55  TUContext = record
56    uc_flags : cULong;
57    uc_link : PUContext;
58    uc_stack : stack_t;
59    uc_sigmask : sigset_t;
60    __padding : array[1..128 - sizeof(sigset_t)] of byte;
61    __pad : cULong;
62    { The following field should be 16-byte-aligned. Currently the
63      directive for specifying alignment is buggy, so the preceding
64      field was added so that the record has the right size. }
65    uc_mcontext : TSigContext;
66  end;
67