/*
 * $Header: /smsa/bsd:include/arm/reg.h:bsd  1.4  $
 * $Source: /smsa/bsd:include/arm/reg.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */
/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)reg.h	7.1 (Berkeley) 6/5/86
 */

#ifndef	__arm_reg_h
#define	__arm_reg_h
#define	__machine_reg_h		"arm"

/*
 * Extract/Update PC part of ARM PC register
 */

#define	GET_PC_PART(apc)	((apc)  & 0x03fffffc)
#define	SET_PC_PART(apc, newv)	(((apc) & 0xfc000003) | ((newv) & 0x03fffffc))

/*
 * Extract/Update MODE part of ARM PC register
 */

#define	GET_MODE_PART(apc)	((apc) & 3)

/*
 * Location of the users' stored
 * registers relative to R0.
 * Usage is u.u_ar0[XX].
 */

#define	R0	0
#define	R1	1
#define	R2	2
#define	R3	3
#define	R4	4
#define	R5	5
#define	R6	6
#define	R7	7
#define	R8	8
#define	R9	9
#define	R10	10
#define	R11	11
#define	R12	12
#define	R13	13
#define	SB	10
#define	FP	11
#define	SPTEMP	12
#define	SP	13
#define	LR	14
#define	PC	15

/*
 * Flags in pc
 */

#define	PC_M0	0x00000001
#define	PC_M1	0x00000002
#define	PC_M	(PC_M0|PC_M1)
#define	PC_N	0x80000000
#define	PC_Z	0x40000000
#define	PC_C	0x20000000
#define	PC_V	0x10000000
#define	PC_I	0x08000000
#define	PC_F	0x04000000
#define	PC_INT	(PC_I|PC_F)

#define	PC_KERNELBITS	(PC_M|PC_INT)

#endif/*__arm_reg_h*/

/* EOF reg.h */
