Home | History | Annotate | Line # | Download | only in include
frame.h revision 1.2
      1 /*	$NetBSD: frame.h,v 1.2 1996/07/11 03:46:02 cgd Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
      5  * All rights reserved.
      6  *
      7  * Author: Chris G. Demetriou
      8  *
      9  * Permission to use, copy, modify and distribute this software and
     10  * its documentation is hereby granted, provided that both the copyright
     11  * notice and this permission notice appear in all copies of the
     12  * software, derivative works or modified versions, and any portions
     13  * thereof, and that both notices appear in supporting documentation.
     14  *
     15  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  *
     19  * Carnegie Mellon requests users of this software to return to
     20  *
     21  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  *  School of Computer Science
     23  *  Carnegie Mellon University
     24  *  Pittsburgh PA 15213-3890
     25  *
     26  * any improvements or extensions that they make and grant Carnegie the
     27  * rights to redistribute these changes.
     28  */
     29 
     30 #ifndef _ALPHA_FRAME_H_
     31 #define	_ALPHA_FRAME_H_
     32 
     33 #include <machine/alpha_cpu.h>
     34 
     35 /*
     36  * Trap and syscall frame.
     37  *
     38  * Hardware puts fields marked "[HW]" on stack.  We have to add
     39  * all of the general-purpose registers except for zero, for sp,
     40  * which is automatically saved in usp for traps, and implicitly
     41  * saved for syscalls, and for a0-a2, which are saved by hardware.
     42  */
     43 
     44 /* Number of registers saved, including padding. */
     45 #define	FRAME_NSAVEREGS	28
     46 
     47 /* The offsets of the registers to be saved, into the array. */
     48 #define	FRAME_V0	0
     49 #define	FRAME_T0	1
     50 #define	FRAME_T1	2
     51 #define	FRAME_T2	3
     52 #define	FRAME_T3	4
     53 #define	FRAME_T4	5
     54 #define	FRAME_T5	6
     55 #define	FRAME_T6	7
     56 #define	FRAME_T7	8
     57 #define	FRAME_S0	9
     58 #define	FRAME_S1	10
     59 #define	FRAME_S2	11
     60 #define	FRAME_S3	12
     61 #define	FRAME_S4	13
     62 #define	FRAME_S5	14
     63 #define	FRAME_S6	15
     64 #define	FRAME_A3	16
     65 #define	FRAME_A4	17
     66 #define	FRAME_A5	18
     67 #define	FRAME_T8	19
     68 #define	FRAME_T9	20
     69 #define	FRAME_T10	21
     70 #define	FRAME_T11	22
     71 #define	FRAME_RA	23
     72 #define	FRAME_T12	24
     73 #define	FRAME_AT	25
     74 #define	FRAME_SP	26
     75 #define	FRAME_SPARE	27	/* spare; padding */
     76 
     77 struct trapframe {
     78 	u_int64_t	tf_regs[FRAME_NSAVEREGS]; /* GPRs (listed above) */
     79 	struct alpha_frame tf_af;		/* hardware-defined frame */
     80 };
     81 
     82 #endif /* _ALPHA_FRAME_H_ */
     83