1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; While most of SBCL is derived from the CMU CL system, the test
5 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; This software is in the public domain and is provided with
9 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
10 ;;;; more information.
14 #-
(and (or x86 x86-64
) (not interpreter
)) (invoke-restart 'run-tests
::skip-file
)
16 (test-util:with-test
(:name
:basic-cpuid
)
17 (flet ((to-ascii (bits)
18 (let ((s (make-array 4 :element-type
'base-char
)))
19 (setf (sap-ref-32 (vector-sap s
) 0) bits
)
21 (multiple-value-bind (a b c d
)
22 (%cpu-identification
0 0)
23 ;; There's nothing to assert here since the result can vary
24 (format t
"~S (max function = ~D)~%"
25 (concatenate 'string
(to-ascii b
) (to-ascii d
) (to-ascii c
))