1.0.28.2: fix bug 201, Incautious type inference from compound types
[sbcl.git] / src / compiler / x86 / system.lisp
index ca691a8..c00907e 100644 (file)
   (:arg-types unsigned-num)
   (:policy :fast-safe)
   (:generator 2
-    (inst fs-segment-prefix)
-    (inst mov sap (make-ea :dword :disp 0 :index n :scale 4))))
+    (inst mov sap (make-ea :dword :disp 0 :index n :scale 4) :fs)))
 
 (define-vop (halt)
   (:generator 1
   (:result-types unsigned-num unsigned-num)
   (:generator 5
      (inst xor eax eax)
+     ;; Intel docs seem quite consistent on only using CPUID before RDTSC,
+     ;; not both before and after. Go figure.
      (inst cpuid)
      (inst rdtsc)
-     (inst push edx)
-     (inst push eax)
-     (inst xor eax eax)
-     (inst cpuid)
-     (inst pop lo)
-     (inst pop hi)))
+     (move lo eax)
+     (move hi edx)))
 
 (defmacro with-cycle-counter (&body body)
   "Returns the primary value of BODY as the primary value, and the