Line | |
---|
1 | /* This file is intended for use by assembly language programs that
|
---|
2 | * need to manipulate a jmp_buf. It may only be used by those systems
|
---|
3 | * for which a jmp_buf is identical to a struct sigcontext.
|
---|
4 | */
|
---|
5 |
|
---|
6 | #ifndef _JMP_BUF_H
|
---|
7 | #define _JMP_BUF_H
|
---|
8 |
|
---|
9 | #if !defined(CHIP)
|
---|
10 | #include "error, configuration is not known"
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #if (CHIP == INTEL)
|
---|
14 | #if _WORD_SIZE == 4
|
---|
15 | #define JB_FLAGS 0
|
---|
16 | #define JB_MASK 4
|
---|
17 | #define JB_GS 8
|
---|
18 | #define JB_FS 10
|
---|
19 | #define JB_ES 12
|
---|
20 | #define JB_DS 14
|
---|
21 | #define JB_DI 16
|
---|
22 | #define JB_SI 20
|
---|
23 | #define JB_BP 24
|
---|
24 | #define JB_ST 28
|
---|
25 | #define JB_BX 32
|
---|
26 | #define JB_DX 36
|
---|
27 | #define JB_CX 40
|
---|
28 | #define JB_AX 44
|
---|
29 | #define JB_RETADR 48
|
---|
30 | #define JB_IP 52
|
---|
31 | #define JB_CS 56
|
---|
32 | #define JB_PSW 60
|
---|
33 | #define JB_SP 64
|
---|
34 | #define JB_SS 68
|
---|
35 | #else /* _WORD_SIZE == 2 */
|
---|
36 | #define JB_FLAGS 0
|
---|
37 | #define JB_MASK 2
|
---|
38 | #define JB_ES 6
|
---|
39 | #define JB_DS 8
|
---|
40 | #define JB_DI 10
|
---|
41 | #define JB_SI 12
|
---|
42 | #define JB_BP 14
|
---|
43 | #define JB_ST 16
|
---|
44 | #define JB_BX 18
|
---|
45 | #define JB_DX 20
|
---|
46 | #define JB_CX 22
|
---|
47 | #define JB_AX 24
|
---|
48 | #define JB_RETADR 26
|
---|
49 | #define JB_IP 28
|
---|
50 | #define JB_CS 30
|
---|
51 | #define JB_PSW 32
|
---|
52 | #define JB_SP 34
|
---|
53 | #define JB_SS 36
|
---|
54 | #endif /* _WORD_SIZE == 2 */
|
---|
55 | #else /* !(CHIP == INTEL) */
|
---|
56 | #if (CHIP == M68000)
|
---|
57 | #define JB_FLAGS 0
|
---|
58 | #define JB_MASK 2
|
---|
59 | #define JB_RETREG 6
|
---|
60 | #define JB_D1 10
|
---|
61 | #define JB_D2 14
|
---|
62 | #define JB_D3 18
|
---|
63 | #define JB_D4 22
|
---|
64 | #define JB_D5 26
|
---|
65 | #define JB_D6 20
|
---|
66 | #define JB_D7 34
|
---|
67 | #define JB_A0 38
|
---|
68 | #define JB_A1 42
|
---|
69 | #define JB_A2 46
|
---|
70 | #define JB_A3 50
|
---|
71 | #define JB_A4 54
|
---|
72 | #define JB_A5 58
|
---|
73 | #define JB_A6 62
|
---|
74 | #define JB_SP 66
|
---|
75 | #define JB_PC 70
|
---|
76 | #define JB_PSW 74
|
---|
77 | #else /* !(CHIP == INTEL) && !(CHIP == M68000) */
|
---|
78 | #include "error, CHIP is not supported"
|
---|
79 | #endif /* (CHIP == INTEL) */
|
---|
80 |
|
---|
81 | /* Defines from C headers needed in assembly code. The headers have too
|
---|
82 | * much C stuff to used directly.
|
---|
83 | */
|
---|
84 | #define SIG_BLOCK 0 /* must agree with <signal.h> */
|
---|
85 | #define SC_SIGCONTEXT 2 /* must agree with <sys/sigcontext.h> */
|
---|
86 | #define SC_NOREGLOCALS 4 /* must agree with <sys/sigcontext.h> */
|
---|
87 | #endif /* _JMP_BUF_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.