Remove a magic number.
This commit is contained in:
parent
2f0f2880cd
commit
fe24623a96
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpuregs.h,v 1.99 2020/05/24 07:15:24 simonb Exp $ */
|
||||
/* $NetBSD: cpuregs.h,v 1.100 2020/07/13 09:00:40 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Miodrag Vallat.
|
||||
|
@ -188,6 +188,9 @@
|
|||
*/
|
||||
#define MIPS_CR_BR_DELAY 0x80000000
|
||||
#define MIPS_CR_COP_ERR 0x30000000
|
||||
#define MIPS_CR_COP_ERR_CU1 1
|
||||
#define MIPS_CR_COP_ERR_CU2 2
|
||||
#define MIPS_CR_COP_ERR_CU3 3
|
||||
#define MIPS1_CR_EXC_CODE 0x0000003C /* four bits */
|
||||
#define MIPS3_CR_EXC_CODE 0x0000007C /* five bits */
|
||||
#define MIPS_CR_IP 0x0000FF00
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.c,v 1.254 2020/06/25 08:00:49 simonb Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.255 2020/07/13 09:00:40 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.254 2020/06/25 08:00:49 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.255 2020/07/13 09:00:40 simonb Exp $");
|
||||
|
||||
#include "opt_cputype.h" /* which mips CPU levels do we support? */
|
||||
#include "opt_ddb.h"
|
||||
|
@ -600,7 +600,7 @@ trap(uint32_t status, uint32_t cause, vaddr_t vaddr, vaddr_t pc,
|
|||
case T_RES_INST+T_USER:
|
||||
case T_COP_UNUSABLE+T_USER:
|
||||
#if !defined(FPEMUL) && !defined(NOFPU)
|
||||
if ((cause & MIPS_CR_COP_ERR) == 0x10000000) {
|
||||
if (__SHIFTOUT(cause, MIPS_CR_COP_ERR) == MIPS_CR_COP_ERR_CU1) {
|
||||
fpu_load(); /* load FPA */
|
||||
} else
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue