Loading...
--- Libc/Libc-262.2.12/ppc/pthreads/init_cpu_capabilities.c
+++ Libc/Libc-583/ppc/pthreads/init_cpu_capabilities.c
@@ -1,9 +1,7 @@
/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2003, 2008 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
- *
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
@@ -29,13 +27,16 @@
#include <machine/cpu_capabilities.h>
#undef __APPLE_API_PRIVATE
+int _cpu_capabilities = 0;
int _cpu_has_altivec = 0; // DEPRECATED: use _cpu_capabilities instead
-int _cpu_capabilities = 0;
+
+extern int _get_cpu_capabilities(void);
__private_extern__ void
_init_cpu_capabilities( void )
{
- _cpu_capabilities = *(int*) _COMM_PAGE_CPU_CAPABILITIES; // pull out of commpage
+ int temp = _get_cpu_capabilities();
+ _cpu_capabilities = temp;
- _cpu_has_altivec = (_cpu_capabilities & kHasAltivec) ? 1 : 0;
+ _cpu_has_altivec = (temp & kHasAltivec) ? 1 : 0;
}