This is thread_status.h in view mode; [Download] [Up]
/*
* Copyright (c) 1991 NeXT Computer, Inc. All rights reserved.
*
* File: mach/m98k/thread_status.h
* Author: Mike DeMoney, NeXT Computer, Inc.
*
* This include file defines the per-thread state
* for NeXT 98K-based products.
*
* HISTORY
* 5-Nov-92 Ben Fathi (benf@next.com)
* Ported to m98k.
*
* 23-Jan-91 Mike DeMoney (mike@next.com)
* Created.
*/
#ifndef _MACH_M98K_THREAD_STATUS_
#define _MACH_M98K_THREAD_STATUS_
#import <architecture/nrw/reg_help.h>
#import <architecture/m98k/basic_regs.h>
#import <architecture/m98k/m98601_regs.h>
#import <architecture/m98k/fp_regs.h>
/**************************************************************************
* Data Typedefs used by thread_getstatus() and thread_setstatus() *
**************************************************************************/
#define M98K_THREAD_STATE_GRF (1) // general registers
#define M98K_THREAD_STATE_FPF (2) // fp registers
#define M98K_THREAD_STATE_USER (3) // non-architectural user state
#define M98601_THREAD_STATE_IMPL (4) // 98601 impl specific
#define M98K_THREAD_STATE_MAXFLAVOR (M98601_THREAD_STATE_IMPL)
/*
* m98k_thread_state_grf -- basic thread state for NeXT 98K-based products
*/
typedef struct _m98k_thread_state_grf {
unsigned r0; // zt (not for mem ref): caller-saved
unsigned r1; // sp (stack pointer): callee-saved
unsigned r2; // toc (tbl of contents): callee saved
unsigned r3; // a0 (arg 0, retval 0): caller saved
unsigned r4; // a1
unsigned r5; // a2
unsigned r6; // a3
unsigned r7; // a4
unsigned r8; // a5
unsigned r9; // a6
unsigned r10; // a7
unsigned r11; // ep (environment ptr): caller saved
unsigned r12; // at (assembler temp): caller saved
unsigned r13; // s17: callee saved
unsigned r14; // s16
unsigned r15; // s15
unsigned r16; // s14
unsigned r17; // s13
unsigned r18; // s12
unsigned r19; // s11
unsigned r20; // s10
unsigned r21; // s9
unsigned r22; // s8
unsigned r23; // s7
unsigned r24; // s6
unsigned r25; // s5
unsigned r26; // s4
unsigned r27; // s3
unsigned r28; // s2
unsigned r29; // s1
unsigned r30; // s0
unsigned r31; // fp (frame pointer): callee saved
unsigned lr; // link register
unsigned ctr; // count register
cr_t cr; // condition register
xer_t xer; // fixed point exception register
msr_t msr; // machine state register
unsigned cia; // current instruction address
} m98k_thread_state_grf_t;
#define M98K_THREAD_STATE_GRF_COUNT \
(sizeof(m98k_thread_state_grf_t)/sizeof(int))
/*
* m98k_thread_state_fpf -- floating point register file contents and
* floating point control registers for NeXT 98K-based products.
*/
typedef struct _m98k_thread_state_fpf {
m98k_fpf_t f0; // ft0 (scratch register): caller-saved
m98k_fpf_t f1; // fa0 (fp arg 0): caller-saved
m98k_fpf_t f2; // fa1
m98k_fpf_t f3; // fa2
m98k_fpf_t f4; // fa3
m98k_fpf_t f5; // fa4
m98k_fpf_t f6; // fa5
m98k_fpf_t f7; // fa6
m98k_fpf_t f8; // fa7
m98k_fpf_t f9; // fa8
m98k_fpf_t f10; // fa9
m98k_fpf_t f11; // fa10
m98k_fpf_t f12; // fa11
m98k_fpf_t f13; // fa12
m98k_fpf_t f14; // fs17: callee-saved
m98k_fpf_t f15; // fs16
m98k_fpf_t f16; // fs15
m98k_fpf_t f17; // fs14
m98k_fpf_t f18; // fs13
m98k_fpf_t f19; // fs12
m98k_fpf_t f20; // fs11
m98k_fpf_t f21; // fs10
m98k_fpf_t f22; // fs9
m98k_fpf_t f23; // fs8
m98k_fpf_t f24; // fs7
m98k_fpf_t f25; // fs6
m98k_fpf_t f26; // fs5
m98k_fpf_t f27; // fs4
m98k_fpf_t f28; // fs3
m98k_fpf_t f29; // fs2
m98k_fpf_t f30; // fs1
m98k_fpf_t f31; // fs0
m98k_fp_scr_t fpscr; // fp status and control register
} m98k_thread_state_fpf_t;
#define M98K_THREAD_STATE_FPF_COUNT \
(sizeof(m98k_thread_state_fpf_t)/sizeof(int))
typedef struct _m98k_thread_state_user {
int user; // user register (for cthreads)
} m98k_thread_state_user_t;
#define M98K_THREAD_STATE_USER_COUNT \
(sizeof(m98k_thread_state_user_t)/sizeof(int))
/*
* Motorola 98601 specific state
* (Can't count on this being in all m98k implementations.)
*/
/*
* A complete Data Breakpoint spec
*/
typedef struct {
m98601_data_bp_addr_t addr;
m98601_data_bp_mode_t mode;
} m98601_data_bp_t;
/*
* m98601_thread_state_impl -- 98601 implementation-specific
* control registers for NeXT 98K-based products.
*/
typedef struct _m98601_thread_state_impl {
/*
* Certain of the 98601 msr bits may be modified
*/
msr_t msr; // machine status
unsigned mq; // multiply quotient register
m98601_data_bp_t data_bp[M98601_N_DATA_BP];
} m98601_thread_state_impl_t;
#define M98601_THREAD_STATE_IMPL_COUNT \
(sizeof(m98601_thread_state_impl_t)/sizeof(int))
#endif _MACH_M98K_THREAD_STATUS_
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.