Index: sys/i386/i386/support.s =================================================================== RCS file: /import/FreeBSD-CVS/src/sys/i386/i386/support.s,v retrieving revision 1.119 diff -u -p -u -r1.119 support.s --- sys/i386/i386/support.s 22 Aug 2007 05:06:14 -0000 1.119 +++ sys/i386/i386/support.s 18 Nov 2007 15:22:19 -0000 @@ -54,7 +54,7 @@ copyin_vector: .globl copyout_vector copyout_vector: .long generic_copyout -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) kernel_fpu_lock: .byte 0xfe .space 3 @@ -202,7 +202,7 @@ do0: END(i486_bzero) #endif -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ENTRY(i586_bzero) movl 4(%esp),%edx movl 8(%esp),%ecx @@ -359,7 +359,7 @@ intreg_i586_bzero: popl %edi ret END(i586_bzero) -#endif /* I586_CPU && defined(DEV_NPX) */ +#endif /* (I586_CPU || I686_CPU) && defined(DEV_NPX) */ ENTRY(sse2_pagezero) pushl %ebx @@ -528,7 +528,7 @@ ENTRY(generic_bcopy) ret END(generic_bcopy) -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ENTRY(i586_bcopy) pushl %esi pushl %edi @@ -676,7 +676,7 @@ small_i586_bcopy: cld ret END(i586_bcopy) -#endif /* I586_CPU && defined(DEV_NPX) */ +#endif /* (I586_CPU || I686_CPU) && defined(DEV_NPX) */ /* * Note: memcpy does not support overlapping copies @@ -764,7 +764,7 @@ ENTRY(generic_copyout) /* bcopy(%esi, %edi, %ebx) */ movl %ebx,%ecx -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ALIGN_TEXT slow_copyout: #endif @@ -797,7 +797,7 @@ copyout_fault: movl $EFAULT,%eax ret -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ENTRY(i586_copyout) /* * Duplicated from generic_copyout. Could be done a bit better. @@ -850,7 +850,7 @@ ENTRY(i586_copyout) addl $4,%esp jmp done_copyout END(i586_copyout) -#endif /* I586_CPU && defined(DEV_NPX) */ +#endif /* (I586_CPU || I686_CPU) && defined(DEV_NPX) */ /* * copyin(from_user, to_kernel, len) - MP SAFE @@ -878,7 +878,7 @@ ENTRY(generic_copyin) cmpl $VM_MAXUSER_ADDRESS,%edx ja copyin_fault -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ALIGN_TEXT slow_copyin: #endif @@ -892,7 +892,7 @@ slow_copyin: rep movsb -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ALIGN_TEXT done_copyin: #endif @@ -913,7 +913,7 @@ copyin_fault: movl $EFAULT,%eax ret -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) ENTRY(i586_copyin) /* * Duplicated from generic_copyin. Could be done a bit better. @@ -947,9 +947,9 @@ ENTRY(i586_copyin) addl $8,%esp jmp done_copyin END(i586_copyin) -#endif /* I586_CPU && defined(DEV_NPX) */ +#endif /* (I586_CPU || I686_CPU) && defined(DEV_NPX) */ -#if defined(I586_CPU) && defined(DEV_NPX) +#if (defined(I586_CPU) || defined(I686_CPU)) && defined(DEV_NPX) /* fastmove(src, dst, len) src in %esi dst in %edi @@ -1155,7 +1155,7 @@ fastmove_tail_fault: movl $EFAULT,%eax ret END(fastmove) -#endif /* I586_CPU && defined(DEV_NPX) */ +#endif /* (I586_CPU || I686_CPU) && defined(DEV_NPX) */ /* * casuword. Compare and set user word. Returns -1 or the current value. Index: sys/i386/isa/npx.c =================================================================== RCS file: /import/FreeBSD-CVS/src/sys/i386/isa/npx.c,v retrieving revision 1.172 diff -u -p -u -r1.172 npx.c --- sys/i386/isa/npx.c 5 Jun 2007 00:00:52 -0000 1.172 +++ sys/i386/isa/npx.c 14 Aug 2007 10:42:50 -0000 @@ -151,10 +151,10 @@ static int npx_attach(device_t dev); static void npx_identify(driver_t *driver, device_t parent); static int npx_intr(void *); static int npx_probe(device_t dev); -#ifdef I586_CPU_XXX +#if defined(I586_CPU) || defined(I686_CPU) static long timezero(const char *funcname, void (*func)(void *buf, size_t len)); -#endif /* I586_CPU */ +#endif /* I586_CPU || I686_CPU */ int hw_float; /* XXX currently just alias for npx_exists */ @@ -430,9 +430,9 @@ npx_attach(dev) npx_cleanstate_ready = 1; intr_restore(s); } -#ifdef I586_CPU_XXX - if (cpu_class == CPUCLASS_586 && npx_ex16 && npx_exists && - timezero("i586_bzero()", i586_bzero) < +#if defined(I586_CPU) || defined(I686_CPU) + if ((cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) && + npx_ex16 && npx_exists && timezero("i586_bzero()", i586_bzero) < timezero("bzero()", bzero) * 4 / 5) { if (!(flags & NPX_DISABLE_I586_OPTIMIZED_BCOPY)) bcopy_vector = i586_bcopy; @@ -1012,7 +1012,7 @@ fpurstor(addr) frstor(addr); } -#ifdef I586_CPU_XXX +#if defined(I586_CPU) || defined(I686_CPU) static long timezero(funcname, func) const char *funcname; @@ -1040,7 +1040,7 @@ timezero(funcname, func) free(buf, M_TEMP); return (usec); } -#endif /* I586_CPU */ +#endif /* I586_CPU || I686_CPU */ static device_method_t npx_methods[] = { /* Device interface */