move #defines back to frame.h

This commit is contained in:
cl 2003-09-23 11:33:50 +00:00
parent 5906faf133
commit 3337c2e727
2 changed files with 133 additions and 129 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpuframe.h,v 1.1 2003/09/22 14:18:37 cl Exp $ */
/* $NetBSD: cpuframe.h,v 1.2 2003/09/23 11:33:50 cl Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -185,122 +185,6 @@ struct switchframe {
u_int sf_pc;
};
/* common frame size */
#define CFSIZE (sizeof(struct frame) - sizeof(union F_u))
#define NFMTSIZE 9
#define FMT0 0x0
#define FMT1 0x1
#define FMT2 0x2
#define FMT3 0x3
#define FMT4 0x4
#define FMT7 0x7
#define FMT8 0x8
#define FMT9 0x9
#define FMTA 0xA
#define FMTB 0xB
/* frame specific info sizes */
#define FMT0SIZE 0
#define FMT1SIZE 0
#define FMT2SIZE sizeof(struct fmt2)
#define FMT3SIZE sizeof(struct fmt3)
#define FMT4SIZE sizeof(struct fmt4)
#define FMT7SIZE sizeof(struct fmt7)
#define FMT8SIZE sizeof(struct fmt8)
#define FMT9SIZE sizeof(struct fmt9)
#define FMTASIZE sizeof(struct fmtA)
#define FMTBSIZE sizeof(struct fmtB)
#define V_BUSERR 0x008
#define V_ADDRERR 0x00C
#define V_TRAP1 0x084
/* 68010 SSW bits */
#define SSW1_RR 0x8000
#define SSW1_IF 0x2000
#define SSW1_DF 0x1000
#define SSW1_RM 0x0800
#define SSW1_HI 0x0400
#define SSW1_BX 0x0200
#define SSW1_RW 0x0100
#define SSW1_FCMASK 0x000F
/* 68020/68030 SSW bits */
#define SSW_RC 0x2000
#define SSW_RB 0x1000
#define SSW_DF 0x0100
#define SSW_RM 0x0080
#define SSW_RW 0x0040
#define SSW_FCMASK 0x0007
/* 68040 SSW bits */
#define SSW4_CP 0x8000
#define SSW4_CU 0x4000
#define SSW4_CT 0x2000
#define SSW4_CM 0x1000
#define SSW4_MA 0x0800
#define SSW4_ATC 0x0400
#define SSW4_LK 0x0200
#define SSW4_RW 0x0100
#define SSW4_WBSV 0x0080 /* really in WB status, not SSW */
#define SSW4_SZMASK 0x0060
#define SSW4_SZLW 0x0000
#define SSW4_SZB 0x0020
#define SSW4_SZW 0x0040
#define SSW4_SZLN 0x0060
#define SSW4_TTMASK 0x0018
#define SSW4_TTNOR 0x0000
#define SSW4_TTM16 0x0008
#define SSW4_TMMASK 0x0007
#define SSW4_TMDCP 0x0000
#define SSW4_TMUD 0x0001
#define SSW4_TMUC 0x0002
#define SSW4_TMKD 0x0005
#define SSW4_TMKC 0x0006
/* 060 Fault Status Long Word (FPSP) */
#define FSLW_MA 0x08000000
#define FSLW_LK 0x02000000
#define FSLW_RW 0x01800000
#define FSLW_RW_R 0x01000000
#define FSLW_RW_W 0x00800000
#define FSLW_SIZE 0x00600000
/*
* We better define the FSLW_SIZE values here, as the table given in the
* MC68060UM/AD rev. 0/1 p. 8-23 is wrong, and was corrected in the errata
* document.
*/
#define FSLW_SIZE_LONG 0x00000000
#define FSLW_SIZE_BYTE 0x00200000
#define FSLW_SIZE_WORD 0x00400000
#define FSLW_SIZE_MV16 0x00600000
#define FLSW_TT 0x00180000
#define FSLW_TM 0x00070000
#define FSLW_TM_SV 0x00040000
#define FSLW_IO 0x00008000
#define FSLW_PBE 0x00004000
#define FSLW_SBE 0x00002000
#define FSLW_PTA 0x00001000
#define FSLW_PTB 0x00000800
#define FSLW_IL 0x00000400
#define FSLW_PF 0x00000200
#define FSLW_SP 0x00000100
#define FSLW_WP 0x00000080
#define FSLW_TWE 0x00000040
#define FSLW_RE 0x00000020
#define FSLW_WE 0x00000010
#define FSLW_TTR 0x00000008
#define FSLW_BPE 0x00000004
#define FSLW_SEE 0x00000001
struct fpframe {
union FPF_u1 {
u_int FPF_null;
@ -352,19 +236,8 @@ struct fpframe {
struct fpframe060 {
u_short fpf6_excp_exp;
u_char fpf6_frmfmt;
#define FPF6_FMT_NULL 0x00
#define FPF6_FMT_IDLE 0x60
#define FPF6_FMT_EXCP 0xe0
u_char fpf6_v;
#define FPF6_V_BSUN 0
#define FPF6_V_INEX12 1
#define FPF6_V_DZ 2
#define FPF6_V_UNFL 3
#define FPF6_V_OPERR 4
#define FPF6_V_OVFL 5
#define FPF6_V_SNAN 6
#define FPF6_V_UNSUP 7
u_long fpf6_upper, fpf6_lower;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: frame.h,v 1.21 2003/09/22 14:18:37 cl Exp $ */
/* $NetBSD: frame.h,v 1.22 2003/09/23 11:33:50 cl Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -80,6 +80,137 @@
#define _M68K_FRAME_H_
#include <m68k/cpuframe.h>
/* common frame size */
#define CFSIZE (sizeof(struct frame) - sizeof(union F_u))
#define NFMTSIZE 9
#define FMT0 0x0
#define FMT1 0x1
#define FMT2 0x2
#define FMT3 0x3
#define FMT4 0x4
#define FMT7 0x7
#define FMT8 0x8
#define FMT9 0x9
#define FMTA 0xA
#define FMTB 0xB
/* frame specific info sizes */
#define FMT0SIZE 0
#define FMT1SIZE 0
#define FMT2SIZE sizeof(struct fmt2)
#define FMT3SIZE sizeof(struct fmt3)
#define FMT4SIZE sizeof(struct fmt4)
#define FMT7SIZE sizeof(struct fmt7)
#define FMT8SIZE sizeof(struct fmt8)
#define FMT9SIZE sizeof(struct fmt9)
#define FMTASIZE sizeof(struct fmtA)
#define FMTBSIZE sizeof(struct fmtB)
#define V_BUSERR 0x008
#define V_ADDRERR 0x00C
#define V_TRAP1 0x084
/* 68010 SSW bits */
#define SSW1_RR 0x8000
#define SSW1_IF 0x2000
#define SSW1_DF 0x1000
#define SSW1_RM 0x0800
#define SSW1_HI 0x0400
#define SSW1_BX 0x0200
#define SSW1_RW 0x0100
#define SSW1_FCMASK 0x000F
/* 68020/68030 SSW bits */
#define SSW_RC 0x2000
#define SSW_RB 0x1000
#define SSW_DF 0x0100
#define SSW_RM 0x0080
#define SSW_RW 0x0040
#define SSW_FCMASK 0x0007
/* 68040 SSW bits */
#define SSW4_CP 0x8000
#define SSW4_CU 0x4000
#define SSW4_CT 0x2000
#define SSW4_CM 0x1000
#define SSW4_MA 0x0800
#define SSW4_ATC 0x0400
#define SSW4_LK 0x0200
#define SSW4_RW 0x0100
#define SSW4_WBSV 0x0080 /* really in WB status, not SSW */
#define SSW4_SZMASK 0x0060
#define SSW4_SZLW 0x0000
#define SSW4_SZB 0x0020
#define SSW4_SZW 0x0040
#define SSW4_SZLN 0x0060
#define SSW4_TTMASK 0x0018
#define SSW4_TTNOR 0x0000
#define SSW4_TTM16 0x0008
#define SSW4_TMMASK 0x0007
#define SSW4_TMDCP 0x0000
#define SSW4_TMUD 0x0001
#define SSW4_TMUC 0x0002
#define SSW4_TMKD 0x0005
#define SSW4_TMKC 0x0006
/* 060 Fault Status Long Word (FPSP) */
#define FSLW_MA 0x08000000
#define FSLW_LK 0x02000000
#define FSLW_RW 0x01800000
#define FSLW_RW_R 0x01000000
#define FSLW_RW_W 0x00800000
#define FSLW_SIZE 0x00600000
/*
* We better define the FSLW_SIZE values here, as the table given in the
* MC68060UM/AD rev. 0/1 p. 8-23 is wrong, and was corrected in the errata
* document.
*/
#define FSLW_SIZE_LONG 0x00000000
#define FSLW_SIZE_BYTE 0x00200000
#define FSLW_SIZE_WORD 0x00400000
#define FSLW_SIZE_MV16 0x00600000
#define FLSW_TT 0x00180000
#define FSLW_TM 0x00070000
#define FSLW_TM_SV 0x00040000
#define FSLW_IO 0x00008000
#define FSLW_PBE 0x00004000
#define FSLW_SBE 0x00002000
#define FSLW_PTA 0x00001000
#define FSLW_PTB 0x00000800
#define FSLW_IL 0x00000400
#define FSLW_PF 0x00000200
#define FSLW_SP 0x00000100
#define FSLW_WP 0x00000080
#define FSLW_TWE 0x00000040
#define FSLW_RE 0x00000020
#define FSLW_WE 0x00000010
#define FSLW_TTR 0x00000008
#define FSLW_BPE 0x00000004
#define FSLW_SEE 0x00000001
/* struct fpframe060 */
#define FPF6_FMT_NULL 0x00
#define FPF6_FMT_IDLE 0x60
#define FPF6_FMT_EXCP 0xe0
#define FPF6_V_BSUN 0
#define FPF6_V_INEX12 1
#define FPF6_V_DZ 2
#define FPF6_V_UNFL 3
#define FPF6_V_OPERR 4
#define FPF6_V_OVFL 5
#define FPF6_V_SNAN 6
#define FPF6_V_UNSUP 7
#include <m68k/signal.h>
#if defined(COMPAT_16) || !defined(_KERNEL)