1 /* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1992, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department and Ralph Campbell. 9 * 10 * %sccs.include.redist.c% 11 * 12 * from: Utah $Hdr: reg.h 1.1 90/07/09$ 13 * 14 * @(#)reg.h 8.2 (Berkeley) 01/11/94 15 */ 16 17 /* 18 * Location of the users' stored 19 * registers relative to ZERO. 20 * Usage is p->p_regs[XX]. 21 */ 22 #define ZERO 0 23 #define AST 1 24 #define V0 2 25 #define V1 3 26 #define A0 4 27 #define A1 5 28 #define A2 6 29 #define A3 7 30 #define T0 8 31 #define T1 9 32 #define T2 10 33 #define T3 11 34 #define T4 12 35 #define T5 13 36 #define T6 14 37 #define T7 15 38 #define S0 16 39 #define S1 17 40 #define S2 18 41 #define S3 19 42 #define S4 20 43 #define S5 21 44 #define S6 22 45 #define S7 23 46 #define T8 24 47 #define T9 25 48 #define K0 26 49 #define K1 27 50 #define GP 28 51 #define SP 29 52 #define S8 30 53 #define RA 31 54 #define MULLO 32 55 #define MULHI 33 56 #define PC 34 57 #define SR 35 58 #define PS 35 /* alias for SR */ 59 #define F0 36 60 #define F1 37 61 #define F2 38 62 #define F3 39 63 #define F4 40 64 #define F5 41 65 #define F6 42 66 #define F7 43 67 #define F8 44 68 #define F9 45 69 #define F10 46 70 #define F11 47 71 #define F12 48 72 #define F13 49 73 #define F14 50 74 #define F15 51 75 #define F16 52 76 #define F17 53 77 #define F18 54 78 #define F19 55 79 #define F20 56 80 #define F21 57 81 #define F22 58 82 #define F23 59 83 #define F24 60 84 #define F25 61 85 #define F26 62 86 #define F27 63 87 #define F28 64 88 #define F29 65 89 #define F30 66 90 #define F31 67 91 #define FSR 68 92 93 #ifdef IPCREG 94 #define NIPCREG 69 95 int ipcreg[NIPCREG] = { 96 ZERO, AST, V0, V1, A0, A1, A2, A3, T0, T1, T2, T3, T4, T5, T6, T7, 97 S0, S1, S2, S3, S4, S5, S6, S7, T8, T9, K0, K1, GP, SP, S8, RA, 98 MULLO, MULHI, PC, 99 F0, F1, F2, F3, F4, F5, F6, F7, 100 F8, F9, F10, F11, F12, F13, F14, F15, 101 F16, F17, F18, F19, F20, F21, F22, F23, 102 F24, F25, F26, F27, F28, F29, F30, F31, FSR, 103 }; 104 #endif 105 106 #ifdef LANGUAGE_C 107 /* 108 * Register set accessible via /proc/$pid/reg 109 */ 110 struct reg { 111 int r_regs[69]; /* numbered as above */ 112 }; 113 #endif /* LANGUAGE_C */ 114