1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Enable the i586-optimized bcopy if the cpu is a "586" and option

I586_OPTIMIZED_BCOPY is configured.

Similarly for bzero/I586_OPTIMIZED_BZERO.

Fake 586's had better have a hardware FPU with non-broken exception
handling (we mask exceptions, but broken exception handling may trap
on the instructions that do the masking).  I guess this means that
the routines won't work on most 386's or FPUless 486's even when they
have a h/w FPU.
This commit is contained in:
Bruce Evans 1996-10-09 18:30:08 +00:00
parent 924a8fa376
commit cf232f113f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18837
2 changed files with 32 additions and 8 deletions

View File

@ -35,9 +35,11 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.4 1996/08/10 08:04:24 peter Exp $
* $Id: identcpu.c,v 1.5 1996/09/06 23:07:02 phk Exp $
*/
#include "opt_temporary.h" /* for I586_OPTIMIZED_B* */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
@ -53,9 +55,12 @@
#include <machine/md_var.h>
/* XXX - should be in header file */
extern void i486_bzero __P((void *, size_t));
extern void i586_bzero __P((void *, size_t));
extern void i686_bzero __P((void *, size_t));
extern void (*bcopy_vector) __P((const void *from, void *to, size_t len));
extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len));
void i486_bzero __P((void *buf, size_t len));
void i586_bcopy __P((const void *from, void *to, size_t len));
void i586_bzero __P((void *buf, size_t len));
void identifycpu(void); /* XXX should be in different header file */
void earlysetcpuclass(void);
@ -173,6 +178,13 @@ identifycpu(void)
(i586_ctr_freq + 4999) / 1000000,
((i586_ctr_freq + 4999) / 10000) % 100);
printf("586");
#ifdef I586_OPTIMIZED_BCOPY
bcopy_vector = i586_bcopy;
ovbcopy_vector = i586_bcopy;
#endif
#ifdef I586_OPTIMIZED_BZERO
bzero = i586_bzero;
#endif
break;
#endif
#if defined(I686_CPU)

View File

@ -35,9 +35,11 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.4 1996/08/10 08:04:24 peter Exp $
* $Id: identcpu.c,v 1.5 1996/09/06 23:07:02 phk Exp $
*/
#include "opt_temporary.h" /* for I586_OPTIMIZED_B* */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
@ -53,9 +55,12 @@
#include <machine/md_var.h>
/* XXX - should be in header file */
extern void i486_bzero __P((void *, size_t));
extern void i586_bzero __P((void *, size_t));
extern void i686_bzero __P((void *, size_t));
extern void (*bcopy_vector) __P((const void *from, void *to, size_t len));
extern void (*ovbcopy_vector) __P((const void *from, void *to, size_t len));
void i486_bzero __P((void *buf, size_t len));
void i586_bcopy __P((const void *from, void *to, size_t len));
void i586_bzero __P((void *buf, size_t len));
void identifycpu(void); /* XXX should be in different header file */
void earlysetcpuclass(void);
@ -173,6 +178,13 @@ identifycpu(void)
(i586_ctr_freq + 4999) / 1000000,
((i586_ctr_freq + 4999) / 10000) % 100);
printf("586");
#ifdef I586_OPTIMIZED_BCOPY
bcopy_vector = i586_bcopy;
ovbcopy_vector = i586_bcopy;
#endif
#ifdef I586_OPTIMIZED_BZERO
bzero = i586_bzero;
#endif
break;
#endif
#if defined(I686_CPU)