From: Raymond Toy Date: Wed, 26 Sep 2012 04:09:46 +0000 (-0700) Subject: Fix ticket:63. X-Git-Tag: snapshot-2012-10~3 X-Git-Url: http://common-lisp.net/gitweb?p=projects%2Fcmucl%2Fcmucl.git;a=commitdiff_plain;h=3832e020b43c1270e0710097381fb718271e61bf Fix ticket:63. --- diff --git a/src/compiler/x86/system.lisp b/src/compiler/x86/system.lisp index edd4aad..bb32332 100644 --- a/src/compiler/x86/system.lisp +++ b/src/compiler/x86/system.lisp @@ -1,4 +1,4 @@ -;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10; Package: x86 -*- +4;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10; Package: x86 -*- ;;; ;;; ********************************************************************** ;;; This code was written as part of the CMU Common Lisp project at @@ -598,11 +598,21 @@ (:result-types unsigned-num unsigned-num) (:temporary (:sc unsigned-reg :offset eax-offset :target lo) eax) (:temporary (:sc unsigned-reg :offset edx-offset :target hi) edx) + ;; CPUID writes to eax, ebx, ecx, and edx. We need temporaries for + ;; ebx and ecx so we don't destroy any live uses of ebx and ecx. + (:temporary (:sc unsigned-reg :offset ebx-offset + :from (:eval 0) :to (:result 1)) + ebx) + (:temporary (:sc unsigned-reg :offset ecx-offset + :from (:eval 0) :to (:result 2)) + ecx) + (:ignore ebx ecx) (:generator 1 - (inst cpuid) - (inst rdtsc) - (move hi edx) - (move lo eax))) + (inst mov eax 0) + (inst cpuid) + (inst rdtsc) + (move hi edx) + (move lo eax))) #+pentium (defun read-cycle-counter ()