home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / i386 / reg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-25  |  4.1 KB  |  128 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon 
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    reg.h,v $
  29.  * Revision 2.2  92/05/25  14:42:52  rwd
  30.  *     Define NIPCREG always, nuke ipcreg.
  31.  *     [92/05/22            rwd]
  32.  * 
  33.  * Revision 2.1  92/04/21  17:19:00  rwd
  34.  * BSDSS
  35.  * 
  36.  *
  37.  */
  38.  
  39. /*-
  40.  * Copyright (c) 1990 The Regents of the University of California.
  41.  * All rights reserved.
  42.  *
  43.  * This code is derived from software contributed to Berkeley by
  44.  * William Jolitz.
  45.  *
  46.  * Redistribution and use in source and binary forms, with or without
  47.  * modification, are permitted provided that the following conditions
  48.  * are met:
  49.  * 1. Redistributions of source code must retain the above copyright
  50.  *    notice, this list of conditions and the following disclaimer.
  51.  * 2. Redistributions in binary form must reproduce the above copyright
  52.  *    notice, this list of conditions and the following disclaimer in the
  53.  *    documentation and/or other materials provided with the distribution.
  54.  * 3. All advertising materials mentioning features or use of this software
  55.  *    must display the following acknowledgement:
  56.  *    This product includes software developed by the University of
  57.  *    California, Berkeley and its contributors.
  58.  * 4. Neither the name of the University nor the names of its contributors
  59.  *    may be used to endorse or promote products derived from this software
  60.  *    without specific prior written permission.
  61.  *
  62.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  63.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  64.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  65.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  66.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  67.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  68.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  69.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  70.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  71.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  72.  * SUCH DAMAGE.
  73.  *
  74.  *    @(#)reg.h    5.5 (Berkeley) 1/18/91
  75.  */
  76.  
  77. /*
  78.  * Location of the users' stored
  79.  * registers within appropriate frame of 'trap' and 'syscall', relative to
  80.  * base of stack frame.
  81.  * Normal usage is u.u_ar0[XX] in kernel.
  82.  */
  83.  
  84. /* When referenced during a trap/exception, registers are at these offsets */
  85.  
  86. #define    tES    (0)
  87. #define    tDS    (1)
  88. #define    tEDI    (2)
  89. #define    tESI    (3)
  90. #define    tEBP    (4)
  91.  
  92. #define    tEBX    (6)
  93. #define    tEDX    (7)
  94. #define    tECX    (8)
  95. #define    tEAX    (9)
  96.  
  97. #define    tEIP    (12)
  98. #define    tCS    (13)
  99. #define    tEFLAGS    (14)
  100. #define    tESP    (15)
  101. #define    tSS    (16)
  102.  
  103. /* During a system call, registers are at these offsets instead of above. */
  104.  
  105. #define    sEDI    (0)
  106. #define    sESI    (1)
  107. #define    sEBP    (2)
  108.  
  109. #define    sEBX    (4)
  110. #define    sEDX    (5)
  111. #define    sECX    (6)
  112. #define    sEAX    (7)
  113. #define    sEFLAGS    (8)
  114. #define    sEIP    (9)
  115. #define    sCS    (10)
  116. #define    sESP    (11)
  117. #define    sSS    (12)
  118.  
  119. #define    PC    sEIP
  120. #define    SP    sESP
  121. #define    PS    sEFLAGS
  122. #define    R0    sEDX
  123. #define    R1    sECX
  124. /*
  125.  * Registers accessible to ptrace(2) syscall for debugger
  126.  */
  127. #define    NIPCREG 14
  128.