static void netbsd_init();
#endif /* __NetBSD__ */
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+
+static void freebsd_init();
+#endif /* __FreeBSD__ */
+
void
os_init(char *argv[], char *envp[])
{
#ifdef __NetBSD__
netbsd_init();
#endif /* __NetBSD__ */
+#ifdef __FreeBSD__
+ freebsd_init();
+#endif /* __FreeBSD__ */
}
int *os_context_pc_addr(os_context_t *context)
}
}
#endif /* __NetBSD__ */
+
+#ifdef __FreeBSD__
+static void freebsd_init()
+{
+ /* Quote from sbcl-devel (NIIMI Satoshi): "Some OSes, like FreeBSD
+ * 4.x with GENERIC kernel, does not enable SSE support even on
+ * SSE capable CPUs". Detect this situation and skip the
+ * fast_bzero sse/base selection logic that's normally done in
+ * x86-assem.S.
+ */
+#ifdef LISP_FEATURE_X86
+ extern void fast_bzero_base(void *, size_t);
+ extern void (*fast_bzero_pointer)(void *, size_t);
+ size_t len;
+ int instruction_sse;
+
+ len = sizeof(instruction_sse);
+ if (sysctlbyname("hw.instruction_sse", &instruction_sse, &len, NULL, 0) != 0
+ || instruction_sse == 0) {
+ /* Use the non-SSE version*/
+ fast_bzero_pointer = fast_bzero_base;
+ }
+#endif /* LISP_FEATURE_X86 */
+}
+#endif /* __FreeBSD__ */
\f
/* threads */
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.8.47"
+"0.9.8.48"