Fix for sb-gmp bignum result allocation (lp#1206191)
[sbcl.git] / src / compiler / mips / macros.lisp
index 44d87ca..da719e2 100644 (file)
@@ -103,7 +103,7 @@ byte-ordering issues."
   #!+sb-doc
   "Emit a return-pc header word.  LABEL is the label to use for this return-pc."
   `(progn
   #!+sb-doc
   "Emit a return-pc header word.  LABEL is the label to use for this return-pc."
   `(progn
-     (align n-lowtag-bits)
+     (emit-alignment n-lowtag-bits)
      (emit-label ,label)
      (inst lra-header-word)))
 
      (emit-label ,label)
      (inst lra-header-word)))
 
@@ -172,8 +172,7 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
            ;; has a 1 bit in the same position, we're all set.  Otherwise,
            ;; we need to subtract the pseudo-atomic bit.
            (inst or ,result-tn alloc-tn ,lowtag)
            ;; has a 1 bit in the same position, we're all set.  Otherwise,
            ;; we need to subtract the pseudo-atomic bit.
            (inst or ,result-tn alloc-tn ,lowtag)
-           (unless (logbitp (1- n-lowtag-bits) ,lowtag)
-                   (inst sub ,result-tn 1))
+           (unless (logbitp 0 ,lowtag) (inst sub ,result-tn 1))
            (inst li ,temp-tn (logior (ash (1- ,size) n-widetag-bits) ,type-code))
            (storew ,temp-tn ,result-tn 0 ,lowtag)
            ,@body))))
            (inst li ,temp-tn (logior (ash (1- ,size) n-widetag-bits) ,type-code))
            (storew ,temp-tn ,result-tn 0 ,lowtag)
            ,@body))))
@@ -203,8 +202,8 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
        (:signed
         (inst slt temp x y)))
      (if not-p
        (:signed
         (inst slt temp x y)))
      (if not-p
-         (inst beq temp zero-tn target)
-         (inst bne temp zero-tn target)))
+         (inst beq temp target)
+         (inst bne temp target)))
     (:gt
      (ecase flavor
        (:unsigned
     (:gt
      (ecase flavor
        (:unsigned
@@ -212,8 +211,8 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
        (:signed
         (inst slt temp y x)))
      (if not-p
        (:signed
         (inst slt temp y x)))
      (if not-p
-         (inst beq temp zero-tn target)
-         (inst bne temp zero-tn target))))
+         (inst beq temp target)
+         (inst bne temp target))))
   (inst nop))
 
 
   (inst nop))
 
 
@@ -238,7 +237,7 @@ placed inside the PSEUDO-ATOMIC, and presumably initializes the object."
           (inst byte (length ,vector))
           (dotimes (i (length ,vector))
             (inst byte (aref ,vector i))))
           (inst byte (length ,vector))
           (dotimes (i (length ,vector))
             (inst byte (aref ,vector i))))
-        (align word-shift)))))
+        (emit-alignment word-shift)))))
 
 (defmacro error-call (vop error-code &rest values)
   #!+sb-doc
 
 (defmacro error-call (vop error-code &rest values)
   #!+sb-doc