source: trunk/minix/kernel/sconst.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 847 bytes
Line 
1! Miscellaneous constants used in assembler code.
2W = _WORD_SIZE ! Machine word size.
3
4! Offsets in struct proc. They MUST match proc.h.
5P_STACKBASE = 0
6#if _WORD_SIZE == 2
7ESREG = P_STACKBASE
8#else
9GSREG = P_STACKBASE
10FSREG = GSREG + 2 ! 386 introduces FS and GS segments
11ESREG = FSREG + 2
12#endif
13DSREG = ESREG + 2
14DIREG = DSREG + 2
15SIREG = DIREG + W
16BPREG = SIREG + W
17STREG = BPREG + W ! hole for another SP
18BXREG = STREG + W
19DXREG = BXREG + W
20CXREG = DXREG + W
21AXREG = CXREG + W
22RETADR = AXREG + W ! return address for save() call
23PCREG = RETADR + W
24CSREG = PCREG + W
25PSWREG = CSREG + W
26SPREG = PSWREG + W
27SSREG = SPREG + W
28P_STACKTOP = SSREG + W
29P_LDT_SEL = P_STACKTOP
30P_LDT = P_LDT_SEL + W
31
32#if _WORD_SIZE == 2
33Msize = 12 ! size of a message in 16-bit words
34#else
35Msize = 9 ! size of a message in 32-bit words
36#endif
Note: See TracBrowser for help on using the repository browser.