diff --git a/src/code/cold-init.lisp b/src/code/cold-init.lisp index b12614894..387ef62eb 100644 --- a/src/code/cold-init.lisp +++ b/src/code/cold-init.lisp @@ -466,7 +466,7 @@ process to continue normally." (sb-debug::disable-debugger)) (call-hooks "initialization" *init-hooks*) #+sb-thread (finalizer-thread-start) - (sb-vm::!setup-cpu-specific-routines)) + (sb-vm::setup-cpu-specific-routines)) ;;;; some support for any hapless wretches who end up debugging cold ;;;; init code diff --git a/src/code/share-vm.lisp b/src/code/share-vm.lisp index 6101117af..dfcae8fea 100644 --- a/src/code/share-vm.lisp +++ b/src/code/share-vm.lisp @@ -159,12 +159,10 @@ (defparameter *cpu-features* nil)) (defmacro def-cpu-feature (name detect) - ;; eval-when doesn't work correctly in the XC - (setf (getf *cpu-features* name) detect) `(progn - (eval-when (:compile-toplevel :load-toplevel :execute) - (define-load-time-global ,(symbolicate '+ name '-routines+) ())) - (setf (getf *cpu-features* ',name) ',detect))) + (define-load-time-global ,(symbolicate '+ name '-routines+) ()) + (eval-when (:compile-toplevel) + (setf (getf *cpu-features* ',name) ',detect)))) (defmacro def-variant (name cpu-feature lambda-list &body body) (let ((variant (symbolicate name '- cpu-feature))) @@ -185,7 +183,8 @@ (define-load-time-global *previous-cpu-routines* nil) -(defmacro !setup-cpu-specific-routines () +(eval-when (:compile-toplevel) +(sb-xc:defmacro setup-cpu-specific-routines () `(progn ,@(loop for (feature detect) on *cpu-features* by #'cddr collect @@ -195,7 +194,7 @@ do (push (cons symbol (%symbol-function symbol)) *previous-cpu-routines*) - (setf (%symbol-function symbol) definition)))))) + (setf (%symbol-function symbol) definition))))))) (defun restore-cpu-specific-routines () (loop for (symbol . fun) in *previous-cpu-routines*