|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1991 NeXT Computer, Inc. All rights reserved. ! 3: * ! 4: * File: mach/m98k/thread_status.h ! 5: * Author: Mike DeMoney, NeXT Computer, Inc. ! 6: * ! 7: * This include file defines the per-thread state ! 8: * for NeXT 98K-based products. ! 9: * ! 10: * HISTORY ! 11: * 5-Nov-92 Ben Fathi ([email protected]) ! 12: * Ported to m98k. ! 13: * ! 14: * 23-Jan-91 Mike DeMoney ([email protected]) ! 15: * Created. ! 16: */ ! 17: ! 18: #ifndef _MACH_M98K_THREAD_STATUS_ ! 19: #define _MACH_M98K_THREAD_STATUS_ ! 20: ! 21: #import <architecture/nrw/reg_help.h> ! 22: #import <architecture/m98k/basic_regs.h> ! 23: #import <architecture/m98k/m98601_regs.h> ! 24: #import <architecture/m98k/fp_regs.h> ! 25: ! 26: /************************************************************************** ! 27: * Data Typedefs used by thread_getstatus() and thread_setstatus() * ! 28: **************************************************************************/ ! 29: ! 30: #define M98K_THREAD_STATE_GRF (1) // general registers ! 31: #define M98K_THREAD_STATE_FPF (2) // fp registers ! 32: #define M98K_THREAD_STATE_USER (3) // non-architectural user state ! 33: #define M98601_THREAD_STATE_IMPL (4) // 98601 impl specific ! 34: ! 35: #define M98K_THREAD_STATE_MAXFLAVOR (M98601_THREAD_STATE_IMPL) ! 36: ! 37: /* ! 38: * m98k_thread_state_grf -- basic thread state for NeXT 98K-based products ! 39: */ ! 40: typedef struct _m98k_thread_state_grf { ! 41: unsigned r0; // zt (not for mem ref): caller-saved ! 42: unsigned r1; // sp (stack pointer): callee-saved ! 43: unsigned r2; // toc (tbl of contents): callee saved ! 44: unsigned r3; // a0 (arg 0, retval 0): caller saved ! 45: unsigned r4; // a1 ! 46: unsigned r5; // a2 ! 47: unsigned r6; // a3 ! 48: unsigned r7; // a4 ! 49: unsigned r8; // a5 ! 50: unsigned r9; // a6 ! 51: unsigned r10; // a7 ! 52: unsigned r11; // ep (environment ptr): caller saved ! 53: unsigned r12; // at (assembler temp): caller saved ! 54: unsigned r13; // s17: callee saved ! 55: unsigned r14; // s16 ! 56: unsigned r15; // s15 ! 57: unsigned r16; // s14 ! 58: unsigned r17; // s13 ! 59: unsigned r18; // s12 ! 60: unsigned r19; // s11 ! 61: unsigned r20; // s10 ! 62: unsigned r21; // s9 ! 63: unsigned r22; // s8 ! 64: unsigned r23; // s7 ! 65: unsigned r24; // s6 ! 66: unsigned r25; // s5 ! 67: unsigned r26; // s4 ! 68: unsigned r27; // s3 ! 69: unsigned r28; // s2 ! 70: unsigned r29; // s1 ! 71: unsigned r30; // s0 ! 72: unsigned r31; // fp (frame pointer): callee saved ! 73: unsigned lr; // link register ! 74: unsigned ctr; // count register ! 75: cr_t cr; // condition register ! 76: xer_t xer; // fixed point exception register ! 77: msr_t msr; // machine state register ! 78: unsigned cia; // current instruction address ! 79: } m98k_thread_state_grf_t; ! 80: ! 81: #define M98K_THREAD_STATE_GRF_COUNT \ ! 82: (sizeof(m98k_thread_state_grf_t)/sizeof(int)) ! 83: ! 84: /* ! 85: * m98k_thread_state_fpf -- floating point register file contents and ! 86: * floating point control registers for NeXT 98K-based products. ! 87: */ ! 88: typedef struct _m98k_thread_state_fpf { ! 89: m98k_fpf_t f0; // ft0 (scratch register): caller-saved ! 90: m98k_fpf_t f1; // fa0 (fp arg 0): caller-saved ! 91: m98k_fpf_t f2; // fa1 ! 92: m98k_fpf_t f3; // fa2 ! 93: m98k_fpf_t f4; // fa3 ! 94: m98k_fpf_t f5; // fa4 ! 95: m98k_fpf_t f6; // fa5 ! 96: m98k_fpf_t f7; // fa6 ! 97: m98k_fpf_t f8; // fa7 ! 98: m98k_fpf_t f9; // fa8 ! 99: m98k_fpf_t f10; // fa9 ! 100: m98k_fpf_t f11; // fa10 ! 101: m98k_fpf_t f12; // fa11 ! 102: m98k_fpf_t f13; // fa12 ! 103: m98k_fpf_t f14; // fs17: callee-saved ! 104: m98k_fpf_t f15; // fs16 ! 105: m98k_fpf_t f16; // fs15 ! 106: m98k_fpf_t f17; // fs14 ! 107: m98k_fpf_t f18; // fs13 ! 108: m98k_fpf_t f19; // fs12 ! 109: m98k_fpf_t f20; // fs11 ! 110: m98k_fpf_t f21; // fs10 ! 111: m98k_fpf_t f22; // fs9 ! 112: m98k_fpf_t f23; // fs8 ! 113: m98k_fpf_t f24; // fs7 ! 114: m98k_fpf_t f25; // fs6 ! 115: m98k_fpf_t f26; // fs5 ! 116: m98k_fpf_t f27; // fs4 ! 117: m98k_fpf_t f28; // fs3 ! 118: m98k_fpf_t f29; // fs2 ! 119: m98k_fpf_t f30; // fs1 ! 120: m98k_fpf_t f31; // fs0 ! 121: m98k_fp_scr_t fpscr; // fp status and control register ! 122: } m98k_thread_state_fpf_t; ! 123: ! 124: #define M98K_THREAD_STATE_FPF_COUNT \ ! 125: (sizeof(m98k_thread_state_fpf_t)/sizeof(int)) ! 126: ! 127: typedef struct _m98k_thread_state_user { ! 128: int user; // user register (for cthreads) ! 129: } m98k_thread_state_user_t; ! 130: ! 131: #define M98K_THREAD_STATE_USER_COUNT \ ! 132: (sizeof(m98k_thread_state_user_t)/sizeof(int)) ! 133: ! 134: /* ! 135: * Motorola 98601 specific state ! 136: * (Can't count on this being in all m98k implementations.) ! 137: */ ! 138: ! 139: /* ! 140: * A complete Data Breakpoint spec ! 141: */ ! 142: typedef struct { ! 143: m98601_data_bp_addr_t addr; ! 144: m98601_data_bp_mode_t mode; ! 145: } m98601_data_bp_t; ! 146: ! 147: /* ! 148: * m98601_thread_state_impl -- 98601 implementation-specific ! 149: * control registers for NeXT 98K-based products. ! 150: */ ! 151: typedef struct _m98601_thread_state_impl { ! 152: /* ! 153: * Certain of the 98601 msr bits may be modified ! 154: */ ! 155: msr_t msr; // machine status ! 156: unsigned mq; // multiply quotient register ! 157: m98601_data_bp_t data_bp[M98601_N_DATA_BP]; ! 158: } m98601_thread_state_impl_t; ! 159: ! 160: #define M98601_THREAD_STATE_IMPL_COUNT \ ! 161: (sizeof(m98601_thread_state_impl_t)/sizeof(int)) ! 162: ! 163: #endif _MACH_M98K_THREAD_STATUS_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.