Annotation of researchv10no/cmd/adb/seq/regs.h, revision 1.1.1.1

1.1       root        1: /* $Copyright: $
                      2:  * Copyright (c) 1984 Sequent Computer Systems, Inc.
                      3:  * All rights reserved
                      4:  * 
                      5:  * This software is furnished under a license and may be used
                      6:  * only in accordance with the terms of that license and with the
                      7:  * inclusion of the above copyright notice.   This software may not
                      8:  * be provided or otherwise made available to, or used by, any
                      9:  * other person.  No title to or ownership of the software is
                     10:  * hereby transferred.
                     11:  */
                     12: 
                     13: /*
                     14:  * $Header: reg.h 1.3 84/12/11 $
                     15:  *
                     16:  * reg.h
                     17:  *     Defines location of the users' stored registers relative to R0.
                     18:  *
                     19:  * Usage is u.u_ar0[XX].
                     20:  */
                     21: 
                     22: /* $Log:       reg.h,v $
                     23:  */
                     24: 
                     25: /*
                     26:  * Assumes use of cxp call into syscall/trap.
                     27:  * Once in syscall/trap handler, stack looks like:
                     28:  *
                     29:  *     modpsr                  user program
                     30:  *     pc                      return context
                     31:  *     fp                      user FP
                     32:  *     old spl value           to restore on exit (nested interrupts)
                     33:  *     r0                      assumes "enter [r0,r1,r2],ENTLOCL*4"
                     34:  *     r1
                     35:  *     r2
                     36:  *     user SP
                     37:  *     trap-type               identify trap
                     38:  *     modpsr                  of locore
                     39:  *     pc                      into locore
                     40:  *     fp                      of locore
                     41:  *     <locals>                # stack variables
                     42:  *     r3
                     43:  *     r4
                     44:  *     r5
                     45:  *     r6
                     46:  *     r7
                     47:  */
                     48: 
                     49: #define        TRAPOFF 8               /* delta between sp&r3, includes trap locals */
                     50: #define        ENTLOCL 1               /* # local words on trap entry */
                     51: 
                     52: #define        MODPSR  (3+ENTLOCL)
                     53: #define        PC      (2+ENTLOCL)
                     54: #define        FP      (1+ENTLOCL)
                     55: 
                     56: #define        R0      (0)
                     57: #define        R1      (-1)
                     58: #define        R2      (-2)
                     59: #define        SP      (-3)
                     60: #define        R3      (-4-TRAPOFF)
                     61: #define        R4      (-5-TRAPOFF)
                     62: #define        R5      (-6-TRAPOFF)
                     63: #define        R6      (-7-TRAPOFF)
                     64: #define        R7      (-8-TRAPOFF)
                     65: 
                     66: #define        PSRADJ  (16)            /* # bits offset of PSR in MODPSR */
                     67: 
                     68: #define        BADREG  (-100)          /* guaranteed not a valid reg offset */
                     69: 
                     70: #define        MAXREG  7               /* biggest register number in stabs */
                     71: #define        MINREG  0               /* smallest reg number */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.