Install the sparc V8 multiply/divide routines after we've collected some

basic information on the CPUs.
This commit is contained in:
pk 2002-12-18 11:56:43 +00:00
parent 1a854929dd
commit 2076dbdb04

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.184 2002/12/06 17:45:39 pk Exp $ */ /* $NetBSD: autoconf.c,v 1.185 2002/12/18 11:56:43 pk Exp $ */
/* /*
* Copyright (c) 1996 * Copyright (c) 1996
@ -181,6 +181,7 @@ find_cpus()
*/ */
cpu_arch = 7; cpu_arch = 7;
/* On sun4 and sun4c we support only one CPU */
if (!CPU_ISSUN4M && !CPU_ISSUN4D) if (!CPU_ISSUN4M && !CPU_ISSUN4D)
return (1); return (1);
@ -193,12 +194,6 @@ find_cpus()
if (n++ == 0) if (n++ == 0)
cpu_arch = PROM_getpropint(node, "sparc-version", 7); cpu_arch = PROM_getpropint(node, "sparc-version", 7);
} }
/* Switch to sparc v8 multiply/divide functions on v8 machines */
if (cpu_arch == 8) {
extern void sparc_v8_muldiv(void);
sparc_v8_muldiv();
}
#endif /* SUN4M || SUN4D */ #endif /* SUN4M || SUN4D */
return (n); return (n);
} }
@ -266,6 +261,14 @@ bootstrap()
cpuinfo.master = 1; cpuinfo.master = 1;
getcpuinfo(&cpuinfo, 0); getcpuinfo(&cpuinfo, 0);
#if defined(SUN4M) || defined(SUN4D)
/* Switch to sparc v8 multiply/divide functions on v8 machines */
if (cpu_arch == 8) {
extern void sparc_v8_muldiv(void);
sparc_v8_muldiv();
}
#endif /* SUN4M || SUN4D */
#ifndef DDB #ifndef DDB
/* /*
* We want to reuse the memory where the symbols were stored * We want to reuse the memory where the symbols were stored