141474Smckusick /* 2*63160Sbostic * Copyright (c) 1982, 1986, 1993 3*63160Sbostic * The Regents of the University of California. All rights reserved. 441474Smckusick * 541474Smckusick * %sccs.include.redist.c% 641474Smckusick * 7*63160Sbostic * @(#)psl.h 8.1 (Berkeley) 06/10/93 841474Smckusick */ 941474Smckusick 1049137Skarels #ifndef PSL_C 1141474Smckusick /* 1241474Smckusick * MC68000 program status word 1341474Smckusick */ 1441474Smckusick 1541474Smckusick #define PSL_C 0x0001 /* carry bit */ 1641474Smckusick #define PSL_V 0x0002 /* overflow bit */ 1741474Smckusick #define PSL_Z 0x0004 /* zero bit */ 1841474Smckusick #define PSL_N 0x0008 /* negative bit */ 1941474Smckusick #define PSL_X 0x0010 /* extend bit */ 2041474Smckusick #define PSL_ALLCC 0x001F /* all cc bits - unlikely */ 2141474Smckusick #define PSL_IPL0 0x0000 /* interrupt priority level 0 */ 2241474Smckusick #define PSL_IPL1 0x0100 /* interrupt priority level 1 */ 2341474Smckusick #define PSL_IPL2 0x0200 /* interrupt priority level 2 */ 2441474Smckusick #define PSL_IPL3 0x0300 /* interrupt priority level 3 */ 2541474Smckusick #define PSL_IPL4 0x0400 /* interrupt priority level 4 */ 2641474Smckusick #define PSL_IPL5 0x0500 /* interrupt priority level 5 */ 2741474Smckusick #define PSL_IPL6 0x0600 /* interrupt priority level 6 */ 2841474Smckusick #define PSL_IPL7 0x0700 /* interrupt priority level 7 */ 2954797Storek #define PSL_M 0x1000 /* master (kernel) sp vs intr sp */ 3041474Smckusick #define PSL_S 0x2000 /* supervisor enable bit */ 3154797Storek /* PSL_T0 0x4000 ??? T0 on 68020, 8000 is T1 */ 3241474Smckusick #define PSL_T 0x8000 /* trace enable bit */ 3341474Smckusick 3441474Smckusick #define PSL_LOWIPL (PSL_S) 3541474Smckusick #define PSL_HIGHIPL (PSL_S | PSL_IPL7) 3641474Smckusick #define PSL_IPL (PSL_IPL7) 3741474Smckusick #define PSL_USER (0) 3841474Smckusick 3957323Shibler #define PSL_MBZ 0xFFFF58E0 /* must be zero bits */ 4041474Smckusick 4141474Smckusick #define PSL_USERSET (0) 4241474Smckusick #define PSL_USERCLR (PSL_S | PSL_IPL7 | PSL_MBZ) 4349137Skarels 4449137Skarels #define USERMODE(ps) (((ps) & PSL_S) == 0) 4549137Skarels #endif 46