1.0.14.27: rename MAKE-FIXNUM to POINTER-HASH
[sbcl.git] / src / compiler / sparc / system.lisp
index 0ef87f4..576dac2 100644 (file)
@@ -48,7 +48,7 @@
     ;; It wasn't a fixnum, so get the low 8 bits.
     (inst b done)
     (inst and result object widetag-mask)
-    
+
     FUNCTION-POINTER
     (inst b done)
     (load-type result object (- fun-pointer-lowtag))
@@ -74,7 +74,7 @@
   (:translate (setf fun-subtype))
   (:policy :fast-safe)
   (:args (type :scs (unsigned-reg) :target result)
-        (function :scs (descriptor-reg)))
+         (function :scs (descriptor-reg)))
   (:arg-types positive-fixnum *)
   (:results (result :scs (unsigned-reg)))
   (:result-types positive-fixnum)
   (:translate set-header-data)
   (:policy :fast-safe)
   (:args (x :scs (descriptor-reg) :target res)
-        (data :scs (any-reg immediate zero)))
+         (data :scs (any-reg immediate zero)))
   (:arg-types * positive-fixnum)
   (:results (res :scs (descriptor-reg)))
   (:temporary (:scs (non-descriptor-reg)) t1 t2)
     (move res x)))
 
 
-(define-vop (make-fixnum)
+(define-vop (pointer-hash)
+  (:translate pointer-hash)
   (:args (ptr :scs (any-reg descriptor-reg)))
   (:results (res :scs (any-reg descriptor-reg)))
+  (:policy :fast-safe)
   (:generator 1
-    ;; FIXME: CMUCL comment:
-    ;; Some code (the hash table code) depends on this returning a
-    ;; positive number so make sure it does.
+    ;; FIXME: It would be better if this would mask the lowtag,
+    ;; and shift the result into a positive fixnum like on x86.
     (inst sll res ptr 3)
     (inst srl res res 1)))
 
 (define-vop (make-other-immediate-type)
   (:args (val :scs (any-reg descriptor-reg))
-        (type :scs (any-reg descriptor-reg immediate)
-              :target temp))
+         (type :scs (any-reg descriptor-reg immediate)
+               :target temp))
   (:results (res :scs (any-reg descriptor-reg)))
   (:temporary (:scs (non-descriptor-reg)) temp)
   (:generator 2
 
 (define-vop (compute-fun)
   (:args (code :scs (descriptor-reg))
-        (offset :scs (signed-reg unsigned-reg)))
+         (offset :scs (signed-reg unsigned-reg)))
   (:arg-types * positive-fixnum)
   (:results (func :scs (descriptor-reg)))
   (:temporary (:scs (non-descriptor-reg)) ndescr)
   (:generator 1
     (inst unimp pending-interrupt-trap)))
 
+#!+sb-thread
+(error "write a VOP for CURRENT-THREAD-OFFSET-SAP")
 
 (define-vop (halt)
   (:generator 1
   (:temporary (:scs (non-descriptor-reg)) count)
   (:generator 1
     (let ((offset
-          (- (* (+ index vector-data-offset) n-word-bytes)
-             other-pointer-lowtag)))
-      (assert (typep offset '(signed-byte 13)))
+           (- (* (+ index vector-data-offset) n-word-bytes)
+              other-pointer-lowtag)))
+      (aver (typep offset '(signed-byte 13)))
       (inst ld count count-vector offset)
       (inst add count 1)
       (inst st count count-vector offset))))