/*
 *  smoke16/include/regs.h - Description of SMOKE-16 register file.
 *  $Revision: 1.12 $
 *  Copyright 1997, Benjamin Sittler
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#ifndef SMOKE16_REGS_H
#define SMOKE16_REGS_H

#include <smoke16/types.h>

/* Fields in %s1 (%ps) */
#define SMOKE16_PS_K	0x8000 /* kernel mode */
#define SMOKE16_PS_IPL	0x7f00 /* interrupt priority level */
#define SMOKE16_PS_CMP	0x00c0 /* comparison flags */
#define SMOKE16_PS_C	0x0080 /* "less than"/"carry"/"borrow" flag (C) */
#define SMOKE16_PS_Z	0x0040 /* "equal to"/"zero" flag (Z) */

/* This is a structure corresponding to the SMOKE-16
   register file image as used by INT/IRET. */
struct smoke16_regs {
  u16 s[4];
  u16 r[16];
};

#define _pc s[0]
#define _ps s[1]
#define _pt s[2]
#define _tt s[3]
#define _t0 r[1]
#define _t1 r[2]
#define _t2 r[3]
#define _t3 r[4]
#define _t4 r[5]
#define _t5 r[6]
#define _t6 r[7]
#define _a0 r[8]
#define _a1 r[9]
#define _a2 r[10]
#define _a3 r[11]
#define _fp r[12]
#define _sp r[13]
#define _ra r[14]
#define _gp r[15]

#endif /* SMOKE16_REGS_H */


