From d8674ec83ae4934812b385a069d03168c0870139 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Mon, 9 Aug 2004 03:23:19 +0000
Subject: [PATCH] Use with-fixed-allocation to allocate a bignum instead of
 modifying alloc-tn directly.

---
 assembly/ppc/arith.lisp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/assembly/ppc/arith.lisp b/assembly/ppc/arith.lisp
index 5632f9d22..24f27d3bf 100644
--- a/assembly/ppc/arith.lisp
+++ b/assembly/ppc/arith.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/ppc/arith.lisp,v 1.3 2004/07/25 18:15:52 pmai Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/ppc/arith.lisp,v 1.4 2004/08/09 03:23:19 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -188,17 +188,14 @@
 
   CONS-BIGNUM
   ;; Allocate a BIGNUM for the result.
-  (pseudo-atomic (pa-flag :extra (pad-data-block (1+ bignum-digits-offset)))
+  (with-fixed-allocation (res pa-flag temp bignum-type (+ 2 bignum-digits-offset))
     (let ((one-word (gen-label)))
-      (inst ori res alloc-tn other-pointer-type)
       ;; We start out assuming that we need one word.  Is that correct?
       (inst srawi temp lo 31)
       (inst xor. temp temp hi)
       (inst li temp (logior (ash 1 type-bits) bignum-type))
       (inst beq one-word)
       ;; Nope, we need two, so allocate the additional space.
-      (inst addi alloc-tn alloc-tn (- (pad-data-block (+ 2 bignum-digits-offset))
-			              (pad-data-block (1+ bignum-digits-offset))))
       (inst li temp (logior (ash 2 type-bits) bignum-type))
       (storew hi res (1+ bignum-digits-offset) other-pointer-type)
       (emit-label one-word)
-- 
GitLab