fpu->npx, emc additions, bigger sigc if needed, save interrupt mask level,...
[unix-history] / usr / src / sys / i386 / include / reg.h
CommitLineData
4bd1c0bf
WN
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * %sccs.include.noredist.c%
9 *
10 * @(#)reg.h 5.1 (Berkeley) %G%
11 */
12
add03a19
BJ
13/*
14 * Location of the users' stored
4bd1c0bf
WN
15 * registers within appropriate frame of 'trap' and 'syscall', relative to
16 * base of stack frame.
17 * Normal usage is u.u_ar0[XX] in kernel.
add03a19
BJ
18 */
19
4bd1c0bf
WN
20/* When referenced during a trap/exception, registers are at these offsets */
21
22#define tES (0)
23#define tDS (1)
24#define tEDI (2)
25#define tESI (3)
26#define tEBP (4)
27
28#define tEBX (6)
29#define tEDX (7)
30#define tECX (8)
31#define tEAX (9)
32
33#define tEIP (12)
34#define tCS (13)
35#define tEFLAGS (14)
36#define tESP (15)
37#define tSS (16)
add03a19 38
4bd1c0bf
WN
39/* During a system call, registers are at these offsets instead of above. */
40
41#define sEDI (0)
42#define sESI (1)
43#define sEBP (2)
44
45#define sEBX (4)
46#define sEDX (5)
47#define sECX (6)
48#define sEAX (7)
49#define sEFLAGS (8)
50#define sEIP (9)
51#define sCS (10)
52#define sESP (11)
53#define sSS (12)
54
55/*
56 * Registers accessible to ptrace(2) syscall for debugger
57 */
add03a19 58#ifdef IPCREG
4bd1c0bf 59#define NIPCREG 14
add03a19 60int ipcreg[NIPCREG] =
4bd1c0bf 61 { tES,tDS,tEDI,tESI,tEBP,tEBX,tEDX,tECX,tEAX,tEIP,tCS,tEFLAGS,tESP,tSS };
add03a19 62#endif