Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106070142
D12707.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12707.diff
View Options
Index: head/sys/conf/kern.mk
===================================================================
--- head/sys/conf/kern.mk
+++ head/sys/conf/kern.mk
@@ -184,9 +184,6 @@
.if ${MACHINE_CPUARCH} == "mips"
CFLAGS+= -msoft-float
INLINE_LIMIT?= 8000
-.if ${MACHINE_ARCH:Mmips*hf} != ""
-CFLAGS+= -DCPU_HAVEFPU
-.endif
.endif
#
Index: head/sys/conf/options.mips
===================================================================
--- head/sys/conf/options.mips
+++ head/sys/conf/options.mips
@@ -39,7 +39,6 @@
CPU_MIPS32 opt_global.h
CPU_MIPS64 opt_global.h
CPU_SENTRY5 opt_global.h
-CPU_HAVEFPU opt_global.h
CPU_SB1 opt_global.h
CPU_CNMIPS opt_global.h
CPU_RMI opt_global.h
Index: head/sys/mips/mips/trap.c
===================================================================
--- head/sys/mips/mips/trap.c
+++ head/sys/mips/mips/trap.c
@@ -75,6 +75,7 @@
#include <machine/trap.h>
#include <machine/cpu.h>
+#include <machine/cpuinfo.h>
#include <machine/pte.h>
#include <machine/pmap.h>
#include <machine/md_var.h>
@@ -970,12 +971,13 @@
case T_COP_UNUSABLE + T_USER:
cop = (trapframe->cause & MIPS_CR_COP_ERR) >> MIPS_CR_COP_ERR_SHIFT;
if (cop == 1) {
-#if !defined(CPU_HAVEFPU)
- /* FP (COP1) instruction */
- log_illegal_instruction("COP1_UNUSABLE", trapframe);
- i = SIGILL;
- break;
-#else
+ /* FP (COP1) instruction */
+ if (cpuinfo.fpu_id == 0) {
+ log_illegal_instruction("COP1_UNUSABLE",
+ trapframe);
+ i = SIGILL;
+ break;
+ }
addr = trapframe->pc;
MipsSwitchFPState(PCPU_GET(fpcurthread), td->td_frame);
PCPU_SET(fpcurthread, td);
@@ -986,7 +988,6 @@
#endif
td->td_md.md_flags |= MDTD_FPUSED;
goto out;
-#endif
}
#ifdef CPU_CNMIPS
else if (cop == 2) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 9:40 PM (10 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15598816
Default Alt Text
D12707.diff (1 KB)
Attached To
Mode
D12707: Remove CPU_HAVEFPU.
Attached
Detach File
Event Timeline
Log In to Comment