Module Name:    src
Committed By:   matt
Date:           Sat Sep  5 03:03:44 UTC 2009

Modified Files:
        src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_exec.c

Log Message:
Fix a few C&P bugs


To generate a diff of this commit:
cvs rdiff -u -r1.50.54.1.4.7 -r1.50.54.1.4.8 \
    src/sys/arch/mips/mips/cpu_exec.c

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/mips/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.7 src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.8
--- src/sys/arch/mips/mips/cpu_exec.c:1.50.54.1.4.7	Thu Sep  3 00:08:19 2009
+++ src/sys/arch/mips/mips/cpu_exec.c	Sat Sep  5 03:03:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.7 2009/09/03 00:08:19 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.50.54.1.4.8 2009/09/05 03:03:44 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.7 2009/09/03 00:08:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.50.54.1.4.8 2009/09/05 03:03:44 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_ultrix.h"
@@ -329,11 +329,11 @@
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_3:
-		if (cpu_arch < CPU_ARCH_MIPS4)
+		if (cpu_arch < CPU_ARCH_MIPS3)
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_4:
-		if (cpu_arch < CPU_ARCH_MIPS3)
+		if (cpu_arch < CPU_ARCH_MIPS4)
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_5:
@@ -421,11 +421,11 @@
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_3:
-		if (cpu_arch < CPU_ARCH_MIPS4)
+		if (cpu_arch < CPU_ARCH_MIPS3)
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_4:
-		if (cpu_arch < CPU_ARCH_MIPS3)
+		if (cpu_arch < CPU_ARCH_MIPS4)
 			return ENOEXEC;
 		break;
 	case EF_MIPS_ARCH_5:
@@ -440,7 +440,7 @@
 		break;
 	}
 
-	switch (eh->e_flags & EF_MIPS_ARCH) {
+	switch (eh->e_flags & (EF_MIPS_ABI|EF_MIPS_ABI2)) {
 	case 0:
 		p->p_md.md_abi = _MIPS_BSD_API_N64;
 		if (old_abi != p->p_md.md_abi)

Reply via email to