]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/__get_cpu_capabilities.s
xnu-3789.41.3.tar.gz
[apple/xnu.git] / libsyscall / wrappers / __get_cpu_capabilities.s
index 12e9c76523b6e4c942ff72db0e09d2659e078ad4..de177986ac276d069a6800cc7113c69152005d16 100644 (file)
@@ -33,8 +33,8 @@
        .align 2, 0x90
        .globl __get_cpu_capabilities
 __get_cpu_capabilities:
-       movq    $(_COMM_PAGE_CPU_CAPABILITIES), %rax
-       movl    (%rax), %eax
+       movq    $(_COMM_PAGE_CPU_CAPABILITIES64), %rax
+       movq    (%rax), %rax
        ret
 
 #elif defined(__i386__)
@@ -43,7 +43,10 @@ __get_cpu_capabilities:
        .align 2, 0x90
        .globl __get_cpu_capabilities
 __get_cpu_capabilities:
-       movl    _COMM_PAGE_CPU_CAPABILITIES, %eax
+       movl    _COMM_PAGE_CPU_CAPABILITIES64, %eax
+       movl    _COMM_PAGE_CPU_CAPABILITIES64+4, %edx
        ret
 
+#else
+#error Unsupported architecture
 #endif