1.0.27.4: x86/x86-64 REP prefix has the same code as REPE (not REPNE)
[sbcl.git] / src / compiler / ppc / system.lisp
index 6a437e1..b5ed227 100644 (file)
     (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
-    ;;
-    ;; Some code (the hash table code) depends on this returning a
-    ;; positive number so make sure it does.
-    (inst slwi res ptr 3)
-    (inst srwi res res 1)))
+    ;; FIXME: It would be better if this would mask the lowtag,
+    ;; and shift the result into a positive fixnum like on x86.
+    (inst rlwinm res ptr n-fixnum-tag-bits 1 n-positive-fixnum-bits)))
 
 (define-vop (make-other-immediate-type)
   (:args (val :scs (any-reg descriptor-reg))