diff --git a/lisp/x86-arch.c b/lisp/x86-arch.c index ef902076e806e1bd39cec958026a570e8ea675ed..ac2345faf60c3f0dcfa0a4a0559c229bce2b9b33 100644 --- a/lisp/x86-arch.c +++ b/lisp/x86-arch.c @@ -1,6 +1,6 @@ /* x86-arch.c -*- Mode: C; comment-column: 40 -*- * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.38 2008/12/07 02:33:55 agoncharov Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.39 2009/01/06 18:18:43 rtoy Rel $ * */ @@ -31,12 +31,25 @@ unsigned long fast_random_state = 1; : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "0" (level)) +void cpuid(int level, unsigned int* a, unsigned int* b, + unsigned int* c, unsigned int* d) +{ + unsigned int eax, ebx, ecx, edx; + + __cpuid(level, eax, ebx, ecx, edx); + + *a = eax; + *b = ebx; + *c = ecx; + *d = edx; +} + int arch_support_sse2(void) { unsigned int eax, ebx, ecx, edx; - __cpuid(1, eax, ebx, ecx, edx); + cpuid(1, &eax, &ebx, &ecx, &edx); /* Return non-zero if SSE2 is supported */ return edx & 0x4000000;