Module Name:    src
Committed By:   matt
Date:           Fri Jan 29 00:16:58 UTC 2010

Modified Files:
        src/sys/arch/algor/conf [matt-nb5-mips64]: P5064 P5064-64
        src/sys/arch/evbmips/conf [matt-nb5-mips64]: ADM5120 ADM5120-NB
            ADM5120-USB ALCHEMY AP30 MALTA MALTA64 MERAKI RB153 WGT624V3 XLSATX
        src/sys/arch/hpcmips/conf [matt-nb5-mips64]: std.hpcmips std.lcard
        src/sys/arch/mips/conf [matt-nb5-mips64]: files.mips
        src/sys/arch/mips/mips [matt-nb5-mips64]: compat_16_machdep.c fp.S
            locore.S mips_emul.c mips_fputrap.c trap.c
        src/sys/arch/sbmips/conf [matt-nb5-mips64]: GENERIC

Log Message:
Change mips kernel options SOFTFLOAT to FPEMUL.  Allow a kernel to have
no FP emulation code.  Fix insufficient SYMTAB_SPACE.  When a kernel without
an FPU and with FPEMUL code, the application will trap with a SIGILL/ILL_ILLOPC
signal, not SIGSEGV/SEGV_MAPERR.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.8.1 src/sys/arch/algor/conf/P5064
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/algor/conf/P5064-64
cvs rdiff -u -r1.3 -r1.3.12.1 src/sys/arch/evbmips/conf/ADM5120 \
    src/sys/arch/evbmips/conf/ADM5120-NB
cvs rdiff -u -r1.2 -r1.2.58.1 src/sys/arch/evbmips/conf/ADM5120-USB \
    src/sys/arch/evbmips/conf/RB153
cvs rdiff -u -r1.20.8.1 -r1.20.8.2 src/sys/arch/evbmips/conf/ALCHEMY
cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/arch/evbmips/conf/AP30
cvs rdiff -u -r1.48.8.2 -r1.48.8.3 src/sys/arch/evbmips/conf/MALTA
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/evbmips/conf/MALTA64
cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/arch/evbmips/conf/MERAKI
cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/evbmips/conf/WGT624V3
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/arch/evbmips/conf/XLSATX
cvs rdiff -u -r1.19 -r1.19.96.1 src/sys/arch/hpcmips/conf/std.hpcmips
cvs rdiff -u -r1.7 -r1.7.76.1 src/sys/arch/hpcmips/conf/std.lcard
cvs rdiff -u -r1.58.24.5 -r1.58.24.6 src/sys/arch/mips/conf/files.mips
cvs rdiff -u -r1.12.14.2 -r1.12.14.3 \
    src/sys/arch/mips/mips/compat_16_machdep.c
cvs rdiff -u -r1.33.38.7 -r1.33.38.8 src/sys/arch/mips/mips/fp.S
cvs rdiff -u -r1.167.38.5 -r1.167.38.6 src/sys/arch/mips/mips/locore.S
cvs rdiff -u -r1.14.78.7 -r1.14.78.8 src/sys/arch/mips/mips/mips_emul.c
cvs rdiff -u -r1.5.66.2 -r1.5.66.3 src/sys/arch/mips/mips/mips_fputrap.c
cvs rdiff -u -r1.217.12.15 -r1.217.12.16 src/sys/arch/mips/mips/trap.c
cvs rdiff -u -r1.70.8.3 -r1.70.8.4 src/sys/arch/sbmips/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/algor/conf/P5064
diff -u src/sys/arch/algor/conf/P5064:1.54 src/sys/arch/algor/conf/P5064:1.54.8.1
--- src/sys/arch/algor/conf/P5064:1.54	Thu Jul 31 07:40:59 2008
+++ src/sys/arch/algor/conf/P5064	Fri Jan 29 00:16:57 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: P5064,v 1.54 2008/07/31 07:40:59 simonb Exp $
+#	$NetBSD: P5064,v 1.54.8.1 2010/01/29 00:16:57 matt Exp $
 #
 # Algorithmics P-5064 kernel.
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"P5064-$Revision: 1.54 $"
+#ident 		"P5064-$Revision: 1.54.8.1 $"
 
 maxusers 32
 
@@ -25,7 +25,7 @@
 options 	DDB			# kernel debugger
 makeoptions	DEBUG="-g"
 #makeoptions	DEBUGLIST="pattern1 pattern2 ..."
-options 	SYMTAB_SPACE=390000
+options 	SYMTAB_SPACE=450000
 
 # File systems
 file-system	FFS		# Fast file system

Index: src/sys/arch/algor/conf/P5064-64
diff -u src/sys/arch/algor/conf/P5064-64:1.1.2.1 src/sys/arch/algor/conf/P5064-64:1.1.2.2
--- src/sys/arch/algor/conf/P5064-64:1.1.2.1	Wed Sep 16 03:39:03 2009
+++ src/sys/arch/algor/conf/P5064-64	Fri Jan 29 00:16:57 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: P5064-64,v 1.1.2.1 2009/09/16 03:39:03 matt Exp $
+#	$NetBSD: P5064-64,v 1.1.2.2 2010/01/29 00:16:57 matt Exp $
 #
 # Algorithmics P-5064 kernel (64-bit).
 #
@@ -8,5 +8,5 @@
 include	"arch/algor/conf/std.algor64"
 
 no options	SYMTAB_SPACE
-options 	SYMTAB_SPACE=505000
-#ident 		"P5064-64-$Revision: 1.1.2.1 $"
+options 	SYMTAB_SPACE=600000
+#ident 		"P5064-64-$Revision: 1.1.2.2 $"

Index: src/sys/arch/evbmips/conf/ADM5120
diff -u src/sys/arch/evbmips/conf/ADM5120:1.3 src/sys/arch/evbmips/conf/ADM5120:1.3.12.1
--- src/sys/arch/evbmips/conf/ADM5120:1.3	Fri May 30 20:10:01 2008
+++ src/sys/arch/evbmips/conf/ADM5120	Fri Jan 29 00:16:57 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: ADM5120,v 1.3 2008/05/30 20:10:01 tsutsui Exp $
+#	$NetBSD: ADM5120,v 1.3.12.1 2010/01/29 00:16:57 matt Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.3 $"
+#ident 		"GENERIC-$Revision: 1.3.12.1 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 #options 	CONSPEED=115200	# YAMON default
 options 	HZ=512		# for profiling
 options 	MEMSIZE="(16*1024*1024)"
@@ -34,7 +34,7 @@
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
 makeoptions 	CPUFLAGS="-march=4kc"
-options 	SYMTAB_SPACE=180000	# size for embedded symbol table
+options 	SYMTAB_SPACE=280000	# size for embedded symbol table
 
 #options 	MEMORY_DISK_HOOKS
 #options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
Index: src/sys/arch/evbmips/conf/ADM5120-NB
diff -u src/sys/arch/evbmips/conf/ADM5120-NB:1.3 src/sys/arch/evbmips/conf/ADM5120-NB:1.3.12.1
--- src/sys/arch/evbmips/conf/ADM5120-NB:1.3	Fri May 30 20:10:02 2008
+++ src/sys/arch/evbmips/conf/ADM5120-NB	Fri Jan 29 00:16:57 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: ADM5120-NB,v 1.3 2008/05/30 20:10:02 tsutsui Exp $
+#	$NetBSD: ADM5120-NB,v 1.3.12.1 2010/01/29 00:16:57 matt Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.3 $"
+#ident 		"GENERIC-$Revision: 1.3.12.1 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 #options 	CONSPEED=115200	# YAMON default
 options 	HZ=512		# for profiling
 options 	MEMSIZE="(16*1024*1024)"

Index: src/sys/arch/evbmips/conf/ADM5120-USB
diff -u src/sys/arch/evbmips/conf/ADM5120-USB:1.2 src/sys/arch/evbmips/conf/ADM5120-USB:1.2.58.1
--- src/sys/arch/evbmips/conf/ADM5120-USB:1.2	Tue Apr  3 21:54:01 2007
+++ src/sys/arch/evbmips/conf/ADM5120-USB	Fri Jan 29 00:16:57 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: ADM5120-USB,v 1.2 2007/04/03 21:54:01 dyoung Exp $
+#	$NetBSD: ADM5120-USB,v 1.2.58.1 2010/01/29 00:16:57 matt Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.2 $"
+#ident 		"GENERIC-$Revision: 1.2.58.1 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 options		CONSPEED=115200	# YAMON default
 options 	HZ=512		# for profiling
 
Index: src/sys/arch/evbmips/conf/RB153
diff -u src/sys/arch/evbmips/conf/RB153:1.2 src/sys/arch/evbmips/conf/RB153:1.2.58.1
--- src/sys/arch/evbmips/conf/RB153:1.2	Tue Apr  3 18:05:57 2007
+++ src/sys/arch/evbmips/conf/RB153	Fri Jan 29 00:16:58 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: RB153,v 1.2 2007/04/03 18:05:57 dyoung Exp $
-#	$Id: RB153,v 1.2 2007/04/03 18:05:57 dyoung Exp $
+#	$NetBSD: RB153,v 1.2.58.1 2010/01/29 00:16:58 matt Exp $
+#	$Id: RB153,v 1.2.58.1 2010/01/29 00:16:58 matt Exp $
 #
 # Example kernel config for the RouterBOARD 153.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.2 $"
+#ident 		"GENERIC-$Revision: 1.2.58.1 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 options 	CONSPEED=115200	# YAMON default
 #options 	HZ=512		# for profiling
 #options	ADM5120_YAMON	# if our bootloader is YAMON
@@ -35,7 +35,7 @@
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
 makeoptions 	CPUFLAGS="-march=4kc"
-options 	SYMTAB_SPACE=360000	# size for embedded symbol table
+options 	SYMTAB_SPACE=380000	# size for embedded symbol table
 
 #options 	MEMORY_DISK_HOOKS
 #options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk

Index: src/sys/arch/evbmips/conf/ALCHEMY
diff -u src/sys/arch/evbmips/conf/ALCHEMY:1.20.8.1 src/sys/arch/evbmips/conf/ALCHEMY:1.20.8.2
--- src/sys/arch/evbmips/conf/ALCHEMY:1.20.8.1	Sat Sep 12 18:22:52 2009
+++ src/sys/arch/evbmips/conf/ALCHEMY	Fri Jan 29 00:16:57 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: ALCHEMY,v 1.20.8.1 2009/09/12 18:22:52 matt Exp $
+#	$NetBSD: ALCHEMY,v 1.20.8.2 2010/01/29 00:16:57 matt Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.alchemy"
 
-#ident 		"ALCHEMY-$Revision: 1.20.8.1 $"
+#ident 		"ALCHEMY-$Revision: 1.20.8.2 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 #options 	CONSPEED=115200	# YAMON default
 options 	HZ=512		# for profiling
 
@@ -48,7 +48,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=375000	# size for embedded symbol table
+options 	SYMTAB_SPACE=425000	# size for embedded symbol table
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries

Index: src/sys/arch/evbmips/conf/AP30
diff -u src/sys/arch/evbmips/conf/AP30:1.10 src/sys/arch/evbmips/conf/AP30:1.10.8.1
--- src/sys/arch/evbmips/conf/AP30:1.10	Thu Jul 31 07:41:00 2008
+++ src/sys/arch/evbmips/conf/AP30	Fri Jan 29 00:16:57 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: AP30,v 1.10 2008/07/31 07:41:00 simonb Exp $
+#	$NetBSD: AP30,v 1.10.8.1 2010/01/29 00:16:57 matt Exp $
 
 include 	"arch/evbmips/conf/std.atheros"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"AP30-$Revision: 1.10 $"
+#ident 		"AP30-$Revision: 1.10.8.1 $"
 
 maxusers	32
 
@@ -13,7 +13,7 @@
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 options		WISOC_AR5312	# WiSoC select
 
 # Options for necessary to use MD

Index: src/sys/arch/evbmips/conf/MALTA
diff -u src/sys/arch/evbmips/conf/MALTA:1.48.8.2 src/sys/arch/evbmips/conf/MALTA:1.48.8.3
--- src/sys/arch/evbmips/conf/MALTA:1.48.8.2	Sat Sep 12 18:22:27 2009
+++ src/sys/arch/evbmips/conf/MALTA	Fri Jan 29 00:16:57 2010
@@ -1,17 +1,17 @@
-#	$NetBSD: MALTA,v 1.48.8.2 2009/09/12 18:22:27 matt Exp $
+#	$NetBSD: MALTA,v 1.48.8.3 2010/01/29 00:16:57 matt Exp $
 
 include 	"arch/evbmips/conf/std.malta"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"MALTA-$Revision: 1.48.8.2 $"
+#ident 		"MALTA-$Revision: 1.48.8.3 $"
 
 maxusers	32
 
 options 	MIPS32
 options 	MIPS64
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+#options 	FPEMUL		# emulate FPU insn
 
 # Options for necessary to use MD
 # options 	MEMORY_DISK_HOOKS
@@ -39,7 +39,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=375000	# size for embedded symbol table
+options 	SYMTAB_SPACE=400000	# size for embedded symbol table
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries

Index: src/sys/arch/evbmips/conf/MALTA64
diff -u src/sys/arch/evbmips/conf/MALTA64:1.1.2.3 src/sys/arch/evbmips/conf/MALTA64:1.1.2.4
--- src/sys/arch/evbmips/conf/MALTA64:1.1.2.3	Sat Sep 12 16:49:57 2009
+++ src/sys/arch/evbmips/conf/MALTA64	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-# $NetBSD: MALTA64,v 1.1.2.3 2009/09/12 16:49:57 matt Exp $
+# $NetBSD: MALTA64,v 1.1.2.4 2010/01/29 00:16:58 matt Exp $
 #
 include "arch/evbmips/conf/MALTA"
 
@@ -8,6 +8,8 @@
 options 	EXEC_ELF64
 options 	COMPAT_NETBSD32
 no options 	SYMTAB_SPACE
-options 	SYMTAB_SPACE=395000	# size for embedded symbol table
+options 	SYMTAB_SPACE=450000	# size for embedded symbol table
+
+#options 	UVMHIST, UVMHIST_PRINT
 
 no ath*

Index: src/sys/arch/evbmips/conf/MERAKI
diff -u src/sys/arch/evbmips/conf/MERAKI:1.6 src/sys/arch/evbmips/conf/MERAKI:1.6.8.1
--- src/sys/arch/evbmips/conf/MERAKI:1.6	Thu Jul 31 07:41:00 2008
+++ src/sys/arch/evbmips/conf/MERAKI	Fri Jan 29 00:16:58 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: MERAKI,v 1.6 2008/07/31 07:41:00 simonb Exp $
+#	$NetBSD: MERAKI,v 1.6.8.1 2010/01/29 00:16:58 matt Exp $
 
 include 	"arch/evbmips/conf/std.meraki"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"AP30-$Revision: 1.6 $"
+#ident 		"AP30-$Revision: 1.6.8.1 $"
 
 maxusers	32
 
@@ -13,7 +13,7 @@
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 options		WISOC_AR5315	# WiSoc select
 
 # Options for necessary to use MD
@@ -47,7 +47,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=260000	# size for embedded symbol table
+options 	SYMTAB_SPACE=300000	# size for embedded symbol table
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries

Index: src/sys/arch/evbmips/conf/WGT624V3
diff -u src/sys/arch/evbmips/conf/WGT624V3:1.3 src/sys/arch/evbmips/conf/WGT624V3:1.3.8.1
--- src/sys/arch/evbmips/conf/WGT624V3:1.3	Thu Jul 31 07:41:00 2008
+++ src/sys/arch/evbmips/conf/WGT624V3	Fri Jan 29 00:16:58 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: WGT624V3,v 1.3 2008/07/31 07:41:00 simonb Exp $
+#	$NetBSD: WGT624V3,v 1.3.8.1 2010/01/29 00:16:58 matt Exp $
 
 include 	"arch/evbmips/conf/std.atheros"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"AP30-$Revision: 1.3 $"
+#ident 		"AP30-$Revision: 1.3.8.1 $"
 
 maxusers	32
 
@@ -13,7 +13,7 @@
 
 options 	MIPS32
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+options 	FPEMUL		# emulate FPU insn
 options		WISOC_AR5315	# WiSoC select
 options		COM_ARBUS_BAUD=9600
 

Index: src/sys/arch/evbmips/conf/XLSATX
diff -u src/sys/arch/evbmips/conf/XLSATX:1.1.2.4 src/sys/arch/evbmips/conf/XLSATX:1.1.2.5
--- src/sys/arch/evbmips/conf/XLSATX:1.1.2.4	Sat Jan 16 23:49:10 2010
+++ src/sys/arch/evbmips/conf/XLSATX	Fri Jan 29 00:16:58 2010
@@ -1,8 +1,8 @@
-#	$NetBSD: XLSATX,v 1.1.2.4 2010/01/16 23:49:10 cliff Exp $
+#	$NetBSD: XLSATX,v 1.1.2.5 2010/01/29 00:16:58 matt Exp $
 
 include 	"arch/evbmips/conf/std.rmixl"
 
-#ident 		"XLSATX-$Revision: 1.1.2.4 $"
+#ident 		"XLSATX-$Revision: 1.1.2.5 $"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
@@ -14,7 +14,7 @@
 ##options		MEMSIZE=0x10000000		# 256MB 
 
 options 	NOFPU		# No FPU
-options 	SOFTFLOAT	# emulate FPU insn
+#options 	FPEMUL		# emulate FPU insn
 
 # Standard system options
 options 	KTRACE		# system call tracing support
@@ -34,7 +34,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=0x60000	# size for embedded symbol table
+options 	SYMTAB_SPACE=500000	# size for embedded symbol table
 #options	DDB_COMMANDONENTER="trace;show registers"
 options		DB_MAX_LINE=-1
 

Index: src/sys/arch/hpcmips/conf/std.hpcmips
diff -u src/sys/arch/hpcmips/conf/std.hpcmips:1.19 src/sys/arch/hpcmips/conf/std.hpcmips:1.19.96.1
--- src/sys/arch/hpcmips/conf/std.hpcmips:1.19	Sun Dec 11 12:17:33 2005
+++ src/sys/arch/hpcmips/conf/std.hpcmips	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: std.hpcmips,v 1.19 2005/12/11 12:17:33 christos Exp $
+#	$NetBSD: std.hpcmips,v 1.19.96.1 2010/01/29 00:16:58 matt Exp $
 # standard, required hpcmips info
 
 machine hpcmips mips
@@ -6,7 +6,7 @@
 makeoptions	MACHINE_ARCH="mipsel"
 
 options 	NOFPU			# No FPU
-options 	SOFTFLOAT		# emulate FPU insn
+options 	FPEMUL			# emulate FPU insn
 
 mainbus0 at root
 cpu* at mainbus0

Index: src/sys/arch/hpcmips/conf/std.lcard
diff -u src/sys/arch/hpcmips/conf/std.lcard:1.7 src/sys/arch/hpcmips/conf/std.lcard:1.7.76.1
--- src/sys/arch/hpcmips/conf/std.lcard:1.7	Sat Sep 16 02:14:56 2006
+++ src/sys/arch/hpcmips/conf/std.lcard	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: std.lcard,v 1.7 2006/09/16 02:14:56 gdamore Exp $
+#	$NetBSD: std.lcard,v 1.7.76.1 2010/01/29 00:16:58 matt Exp $
 # standard, required hpcmips info
 
 machine hpcmips mips
@@ -6,7 +6,7 @@
 makeoptions	MACHINE_ARCH="mipsel"
 
 options 	NOFPU			# No FPU
-options 	SOFTFLOAT		# emulate FPU insn
+options 	FPEMUL			# emulate FPU insn
 
 options 	MIPS3			# R4000/R4400/R4600 CPUs
 options 	MIPS3_4100		# VR4100 core

Index: src/sys/arch/mips/conf/files.mips
diff -u src/sys/arch/mips/conf/files.mips:1.58.24.5 src/sys/arch/mips/conf/files.mips:1.58.24.6
--- src/sys/arch/mips/conf/files.mips:1.58.24.5	Fri Jan 22 07:41:10 2010
+++ src/sys/arch/mips/conf/files.mips	Fri Jan 29 00:16:58 2010
@@ -1,7 +1,7 @@
-#	$NetBSD: files.mips,v 1.58.24.5 2010/01/22 07:41:10 matt Exp $
+#	$NetBSD: files.mips,v 1.58.24.6 2010/01/29 00:16:58 matt Exp $
 #
 
-defflag	opt_cputype.h		NOFPU
+defflag	opt_cputype.h		NOFPU FPEMUL
 				MIPS64_SB1
 				MIPS64_XLP MIPS64_XLR MIPS64_XLS
 					# and the rest...
@@ -58,9 +58,9 @@
 file	arch/mips/mips/cache_r10k.c	(mips3|mips4) & enable_mips4_cache_r10k
 file	arch/mips/mips/cache_mipsNN.c		mips32 | mips64
 
-file	arch/mips/mips/mips_fputrap.c		softfloat | !nofpu
+file	arch/mips/mips/mips_fputrap.c		!nofpu | fpemul
 file	arch/mips/mips/mips_emul.c
-file	arch/mips/mips/fp.S			softfloat | !nofpu
+file	arch/mips/mips/fp.S			!nofpu | fpemul
 
 file	arch/mips/mips/procfs_machdep.c		procfs
 

Index: src/sys/arch/mips/mips/compat_16_machdep.c
diff -u src/sys/arch/mips/mips/compat_16_machdep.c:1.12.14.2 src/sys/arch/mips/mips/compat_16_machdep.c:1.12.14.3
--- src/sys/arch/mips/mips/compat_16_machdep.c:1.12.14.2	Sun Aug 23 04:04:35 2009
+++ src/sys/arch/mips/mips/compat_16_machdep.c	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_machdep.c,v 1.12.14.2 2009/08/23 04:04:35 matt Exp $	*/
+/*	$NetBSD: compat_16_machdep.c,v 1.12.14.3 2010/01/29 00:16:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 	
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.12.14.2 2009/08/23 04:04:35 matt Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.12.14.3 2010/01/29 00:16:58 matt Exp $"); 
 
 #include "opt_cputype.h"
 #include "opt_compat_netbsd.h"
@@ -127,7 +127,7 @@
 #endif
 
 	/* Save the FP state, if necessary, then copy it. */
-#ifndef SOFTFLOAT
+#if defined(FPEMUL) || !defined(NOFPU)
 	ksc.sc_fpused = l->l_md.md_flags & MDP_FPUSED;
 	if (ksc.sc_fpused) {
 		/* if FPU has current state, save it first */
@@ -269,7 +269,7 @@
 	for (size_t i = 1; i < __arraycount(f->f_regs); i++)
 		f->f_regs[i] = ksc.sc_regs[i];
 #endif
-#ifndef	SOFTFLOAT
+#if defined(FPEMUL) || !defined(NOFPU)
 	if (scp->sc_fpused) {
 		/* Disable the FPU to fault in FP registers. */
 		f->f_regs[_R_SR] &= ~MIPS_SR_COP_1_BIT;

Index: src/sys/arch/mips/mips/fp.S
diff -u src/sys/arch/mips/mips/fp.S:1.33.38.7 src/sys/arch/mips/mips/fp.S:1.33.38.8
--- src/sys/arch/mips/mips/fp.S:1.33.38.7	Fri Jan 22 08:37:08 2010
+++ src/sys/arch/mips/mips/fp.S	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fp.S,v 1.33.38.7 2010/01/22 08:37:08 matt Exp $	*/
+/*	$NetBSD: fp.S,v 1.33.38.8 2010/01/29 00:16:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -73,7 +73,7 @@
 #define COND_LESS	0x4
 #define COND_SIGNAL	0x8
 
-#if defined(SOFTFLOAT)
+#if defined(FPEMUL)
 #if defined(__mips_o32) || defined(__mips_o64)
 #define FPX_L			INT_L
 #define FPX_S			INT_S
@@ -136,7 +136,7 @@
  */
 	srl	v0, a0, 21 - PTR_SCALESHIFT	# get FMT field
 	andi	v0, v0, 0x1F << PTR_SCALESHIFT	# mask FMT field
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	PTR_L	a3, fmt_tbl(v0)			# switch on FUNC & FMT
 	INT_L	a2, U_PCB_FPREGS+FRAME_FSR(t0)
@@ -178,7 +178,7 @@
 #define	paired_single_op	ill
 #endif
 
-#ifndef SOFTFLOAT
+#ifndef FPEMUL
 #define	mfromc1		ill
 #define	dmfromc1	ill
 #define	cfromc1		ill
@@ -644,7 +644,7 @@
 
 	.text
 
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 mfromc1:
 	srl	t1, a0, 11-FPX_SCALESHIFT	# fs is in bits 15:11
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
@@ -681,7 +681,7 @@
 
 	b	done
 
-#if defined(SOFTFLOAT) && (defined(__mips_n32) || defined(__mips_n64))
+#if defined(FPEMUL) && (defined(__mips_n32) || defined(__mips_n64))
 dmfromc1:
 	srl	t1, a0, 11-DFPX_SCALESHIFT	# fs is in bits 15:11
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
@@ -717,7 +717,7 @@
 	DFPX_S	v0, U_PCB_FPREGS+FRAME_FP0(t0)
 
 	b	done
-#endif /* SOFTFLOAT && (__mips_n32 || __mips_n64) */
+#endif /* FPEMUL && (__mips_n32 || __mips_n64) */
 
 cfromc1:
 	srl	t1, a0, 11
@@ -1313,7 +1313,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0
 	and	v0, a2, MIPS_FPU_ENABLE_DIV0	# trap enabled?
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	t1, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(t1)
@@ -1393,7 +1393,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0
 	and	v0, a2, MIPS_FPU_ENABLE_DIV0	# trap enabled?
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	t1, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(t1)
@@ -2011,7 +2011,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT
 	and	v0, a2, MIPS_FPU_ENABLE_INEXACT
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2123,7 +2123,7 @@
 1:
 	or	a2, a2, MIPS_FPU_COND_BIT	# set condition bit
 2:
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2146,7 +2146,7 @@
 	and	v0, a2, MIPS_FPU_ENABLE_INVALID
 	bne	v0, zero, fpe_trap
 1:
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2263,7 +2263,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT
 	and	v0, a2, MIPS_FPU_ENABLE_INEXACT
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2384,7 +2384,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT
 	and	v0, a2, MIPS_FPU_ENABLE_INEXACT
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2525,7 +2525,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT
 	and	v0, a2, MIPS_FPU_ENABLE_INEXACT
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2668,7 +2668,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT
 	and	v0, a2, MIPS_FPU_ENABLE_INEXACT
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2685,7 +2685,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID
 	and	v0, a2, MIPS_FPU_ENABLE_INVALID
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2706,7 +2706,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID
 	and	v0, a2, MIPS_FPU_ENABLE_INVALID
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2728,7 +2728,7 @@
 	or	a2, a2, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID
 	and	v0, a2, MIPS_FPU_ENABLE_INVALID
 	bne	v0, zero, fpe_trap
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2746,7 +2746,7 @@
  * Trap if the hardware should have handled this case.
  */
 fpe_trap:
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2774,7 +2774,7 @@
  * Send an illegal instruction signal to the current process.
  */
 ill:
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	PTR_L	v0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	#nop
 	INT_S	a2, U_PCB_FPREGS+FRAME_FSR(v0)
@@ -2859,7 +2859,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(get_fs_int)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t2, a0, 11 - FPX_SCALESHIFT
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t2, t2, FPX_REGEVENMASK		# Even regs only
@@ -2972,7 +2972,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(get_ft_fs_s)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	ta0, a0, 16 - FPX_SCALESHIFT
 	PTR_L	ta1, L_ADDR(MIPS_CURLWP)	# get pcb of current process
 	andi	ta0, ta0, FPX_REGEVENMASK	# Even regs only
@@ -3089,7 +3089,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_XLEAF(get_fs_s)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t0, a0, 11 - FPX_SCALESHIFT
 	PTR_L	t1, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t0, t0, FPX_REGEVENMASK		# Even regs only
@@ -3212,7 +3212,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(get_ft_fs_d)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	ta3, a0, 16 - FPX_SCALESHIFT
 	PTR_L	ta0, L_ADDR(MIPS_CURLWP)	# get pcb of current process
 	andi	ta3, ta3, FPX_REGEVENMASK	# Even regs only
@@ -3353,7 +3353,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_XLEAF(get_fs_d)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t3, a0, 11 - FPX_SCALESHIFT
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t3, t3, FPX_REGEVENMASK		# Even regs only
@@ -3497,7 +3497,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(get_cmp_s)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t1, a0, 11 - FPX_SCALESHIFT
 	PTR_L	ta2, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t1, t1, FPX_REGEVENMASK			# Even regs only
@@ -3701,7 +3701,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(get_cmp_d)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t1, a0, 11-FPX_SCALESHIFT
 	PTR_L	ta2, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t1, t1, FPX_REGEVENMASK			# Even regs only
@@ -3960,7 +3960,7 @@
 	or	t2, t2, t0
 	or	t2, t2, t1
 STATIC_XLEAF(set_fd_word)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	srl	t1, a0, 6 - FPX_SCALESHIFT
 	PTR_L	t0, L_ADDR(MIPS_CURLWP)		# get pcb of current process
 	andi	t1, t1, FPX_REGEVENMASK		# Even regs only
@@ -4061,7 +4061,7 @@
  *----------------------------------------------------------------------------
  */
 STATIC_LEAF(set_fd_d)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 	sll	t0, t0, 31			# set sign
 	sll	t1, t1, 20			# set exponent
 	or	t0, t0, t1
@@ -4404,7 +4404,7 @@
 	j	ra
 END(renorm_ft_d)
 
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 /*
  * Emulate branch delay slot CPU instruction.
  * Enter from BC1x emulation.
@@ -5177,7 +5177,7 @@
  * Args are same as MachEmulateFP.
  */
 STATIC_LEAF(fpemul_sigill)
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 STATIC_XLEAF(bcemul_sigill)
 #endif
 	li	t0, 0xFFFFFF00
@@ -5207,7 +5207,7 @@
 	j	_C_LABEL(fpemul_trapsignal)
 END(fpemul_sigfpe)
 
-#ifdef SOFTFLOAT
+#ifdef FPEMUL
 STATIC_LEAF(bcemul_sigfpe)
 	li	t0, 0xFFFFFF00
 	and	a2, a2, t0

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.167.38.5 src/sys/arch/mips/mips/locore.S:1.167.38.6
--- src/sys/arch/mips/mips/locore.S:1.167.38.5	Wed Jan 20 06:58:36 2010
+++ src/sys/arch/mips/mips/locore.S	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.167.38.5 2010/01/20 06:58:36 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.167.38.6 2010/01/29 00:16:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -620,7 +620,7 @@
 END(mips_cp0_tlb_page_mask_probe)
 #endif /* MIPS3_PLUS */
 
-#if !defined(NOFPU) && !defined(SOFTFLOAT)
+#if !defined(NOFPU) || defined(FPEMUL)
 /*----------------------------------------------------------------------------
  *
  * MachFPInterrupt --
@@ -753,7 +753,7 @@
 	j		ra
 	PTR_ADDU	sp, CALLFRAME_SIZ
 END(MachFPInterrupt)
-#endif /* !defined(NOFPU) && !defined(SOFTFLOAT) */
+#endif /* !defined(NOFPU) || defined(FPEMUL) */
 
 LEAF(mips_pagecopy)
 	.set	push

Index: src/sys/arch/mips/mips/mips_emul.c
diff -u src/sys/arch/mips/mips/mips_emul.c:1.14.78.7 src/sys/arch/mips/mips/mips_emul.c:1.14.78.8
--- src/sys/arch/mips/mips/mips_emul.c:1.14.78.7	Fri Jan 22 08:35:59 2010
+++ src/sys/arch/mips/mips/mips_emul.c	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_emul.c,v 1.14.78.7 2010/01/22 08:35:59 matt Exp $ */
+/*	$NetBSD: mips_emul.c,v 1.14.78.8 2010/01/29 00:16:58 matt Exp $ */
 
 /*
  * Copyright (c) 1999 Shuichiro URATA.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.7 2010/01/22 08:35:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.8 2010/01/29 00:16:58 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -43,7 +43,9 @@
 #include <mips/vmparam.h>			/* for VM_MAX_ADDRESS */
 #include <mips/trap.h>
 
+#if !defined(NOFPU) || defined(FPEMUL)
 void MachEmulateFP(uint32_t, struct frame *, uint32_t);
+#endif
 
 static inline void	send_sigsegv(intptr_t, uint32_t, struct frame *,
 			    uint32_t);
@@ -221,6 +223,7 @@
 {
 	uint32_t inst;
 	ksiginfo_t ksi;
+	int code = ILL_ILLOPC;
 
 	/*
 	 *  Fetch the instruction.
@@ -241,32 +244,43 @@
 		MachEmulateSpecial(inst, frame, cause);
 		break;
 	case OP_COP1:
+#if defined(FPEMUL)
 		MachEmulateFP(inst, frame, cause);
 		break;
-#if defined(SOFTFLOAT)
+#endif
 	case OP_LWC1:
+#if defined(FPEMUL)
 		MachEmulateLWC1(inst, frame, cause);
 		break;
+#endif
 	case OP_LDC1:
+#if defined(FPEMUL)
 		MachEmulateLDC1(inst, frame, cause);
 		break;
+#endif
 	case OP_SWC1:
+#if defined(FPEMUL)
 		MachEmulateSWC1(inst, frame, cause);
 		break;
+#endif
 	case OP_SDC1:
+#if defined(FPEMUL)
 		MachEmulateSDC1(inst, frame, cause);
 		break;
+#else
+		code = ILL_COPROC;
+		/* FALLTHROUGH */
 #endif
 	default:
 #ifdef DEBUG
-		printf("pid %d(%s): trap: bad vaddr %#"PRIxVADDR" cause %#x insn %#x\n", curproc->p_pid, curproc->p_comm, opc, cause, inst);
+		printf("pid %d (%s): trap: bad insn %#"PRIxVADDR" cause %#x insn %#x\n", curproc->p_pid, curproc->p_comm, opc, cause, inst);
 #endif
 		frame->f_regs[_R_CAUSE] = cause;
 		frame->f_regs[_R_BADVADDR] = opc;
 		KSI_INIT_TRAP(&ksi);
-		ksi.ksi_signo = SIGSEGV;
+		ksi.ksi_signo = SIGILL;
 		ksi.ksi_trap = cause; /* XXX */
-		ksi.ksi_code = SEGV_MAPERR;
+		ksi.ksi_code = code;
 		ksi.ksi_addr = (void *)opc;
 		(*curproc->p_emul->e_trapsignal)(curlwp, &ksi);
 		break;
@@ -411,7 +425,7 @@
 	update_pc(frame, cause);
 }
 
-#if defined(SOFTFLOAT)
+#if defined(FPEMUL)
 
 #define LWSWC1_MAXLOOP	12
 
@@ -1120,4 +1134,4 @@
 	update_pc(frame, cause);
 }
 #endif /* defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) */
-#endif /* defined(SOFTFLOAT) */
+#endif /* defined(FPEMUL) */

Index: src/sys/arch/mips/mips/mips_fputrap.c
diff -u src/sys/arch/mips/mips/mips_fputrap.c:1.5.66.2 src/sys/arch/mips/mips/mips_fputrap.c:1.5.66.3
--- src/sys/arch/mips/mips/mips_fputrap.c:1.5.66.2	Wed Aug 26 14:33:59 2009
+++ src/sys/arch/mips/mips/mips_fputrap.c	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fputrap.c,v 1.5.66.2 2009/08/26 14:33:59 matt Exp $ */
+/* $NetBSD: mips_fputrap.c,v 1.5.66.3 2010/01/29 00:16:58 matt Exp $ */
 
 /*
  * Copyright (c) 2004
@@ -34,7 +34,7 @@
 #include <mips/cpuregs.h>
 #include <mips/regnum.h>
 
-#ifndef SOFTFLOAT
+#if defined(FPEMUL) || !defined(NOFPU)
 void mips_fpuexcept(struct lwp *, unsigned int);
 void mips_fpuillinst(struct lwp *, unsigned int, unsigned long);
 static int fpustat2sicode(unsigned int);
@@ -86,7 +86,7 @@
 			return (fpecodes[i].code);
 	return (FPE_FLTINV);
 }
-#endif /* !SOFTFLOAT */
+#endif /* FPEMUL || !NOFPU */
 
 void fpemul_trapsignal(struct lwp *, unsigned int, unsigned int);
 

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.217.12.15 src/sys/arch/mips/mips/trap.c:1.217.12.16
--- src/sys/arch/mips/mips/trap.c:1.217.12.15	Fri Jan 22 07:41:10 2010
+++ src/sys/arch/mips/mips/trap.c	Fri Jan 29 00:16:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.217.12.15 2010/01/22 07:41:10 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.217.12.16 2010/01/29 00:16:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -78,7 +78,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.217.12.15 2010/01/22 07:41:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.217.12.16 2010/01/29 00:16:58 matt Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -535,7 +535,7 @@
 	    }
 	case T_RES_INST+T_USER:
 	case T_COP_UNUSABLE+T_USER:
-#if !defined(SOFTFLOAT) && !defined(NOFPU)
+#if !defined(FPEMUL) && !defined(NOFPU)
 		if ((cause & MIPS_CR_COP_ERR) == 0x10000000) {
 			savefpregs(fpcurlwp);		/* yield FPA */
 			loadfpregs(l);          	/* load FPA */
@@ -549,7 +549,7 @@
 		userret(l);
 		return; /* GEN */
 	case T_FPE+T_USER:
-#if defined(SOFTFLOAT)
+#if defined(FPEMUL)
 		MachEmulateInst(status, cause, opc, l->l_md.md_regs);
 #elif !defined(NOFPU)
 		MachFPTrap(status, cause, opc, l->l_md.md_regs);

Index: src/sys/arch/sbmips/conf/GENERIC
diff -u src/sys/arch/sbmips/conf/GENERIC:1.70.8.3 src/sys/arch/sbmips/conf/GENERIC:1.70.8.4
--- src/sys/arch/sbmips/conf/GENERIC:1.70.8.3	Thu Jan 21 08:38:46 2010
+++ src/sys/arch/sbmips/conf/GENERIC	Fri Jan 29 00:16:58 2010
@@ -1,10 +1,10 @@
-# $NetBSD: GENERIC,v 1.70.8.3 2010/01/21 08:38:46 cyber Exp $
+# $NetBSD: GENERIC,v 1.70.8.4 2010/01/29 00:16:58 matt Exp $
 
 include 	"arch/sbmips/conf/std.sbmips"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.70.8.3 $"
+#ident 		"GENERIC-$Revision: 1.70.8.4 $"
 
 #options 	LOCKDEBUG	# XXX XXX XXX XXX
 #options 	DEBUG		# extra kernel debugging support
@@ -12,7 +12,7 @@
 # The following three options are required for BCM1250 pass 1 silicon
 #options 	SB1250_PASS1
 #options 	NOFPU
-#options 	SOFTFLOAT
+#options 	FPEMUL
 
 maxusers	32
 

Reply via email to