]> git.saurik.com Git - apple/libc.git/blobdiff - ppc/pthreads/init_cpu_capabilities.c
Libc-498.tar.gz
[apple/libc.git] / ppc / pthreads / init_cpu_capabilities.c
index 8c9266a577a8c036a62a1e6b6e7b6b0eb7ba62e2..bbbd51a4f9e3f1927b397e25b9da656ed335cdc2 100644 (file)
@@ -3,8 +3,6 @@
  *
  * @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
  * Version 2.0 (the 'License'). You may not use this file except in
 #include <machine/cpu_capabilities.h>
 #undef __APPLE_API_PRIVATE
 
-int _cpu_has_altivec = 0;              // DEPRECATED: use _cpu_capabilities instead
 int _cpu_capabilities = 0;
+int _cpu_has_altivec = 0;              // DEPRECATED: use _cpu_capabilities instead
 
 __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;
 }