Commit fc136420 authored by Raymond Toy's avatar Raymond Toy
Browse files

Remove the temp arg from ALLOCATION and WITH-FIXED-ALLOCATION. Remove

the temp tn too, if one was added.
parent 0049213d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
  (inst ret)
  BIGNUM

  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1) nil)
  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1))
    (storew eax ebx bignum-digits-offset other-pointer-type))

  (inst ret))
@@ -65,11 +65,11 @@
  (inst jmp :ns one-word-bignum)

  ;; Two word bignum
  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 2) nil)
  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 2))
    (storew eax ebx bignum-digits-offset other-pointer-type))
  (inst ret)
  
  ONE-WORD-BIGNUM
  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1) nil)
  (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1))
    (storew eax ebx bignum-digits-offset other-pointer-type))
  (inst ret))
+7 −9
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@

			     (:temp eax unsigned-reg eax-offset)
			     (:temp ebx unsigned-reg ebx-offset)
			     (:temp ecx unsigned-reg ecx-offset)
			     (:temp temp unsigned-reg esi-offset))
			     (:temp ecx unsigned-reg ecx-offset))
    (declare (ignorable ebx))

    (inst test x 3)			; fixnum?
@@ -74,7 +73,7 @@

  (move ecx res)

  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset) nil)
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset))
    (storew ecx res bignum-digits-offset other-pointer-type))
  
  OKAY)
@@ -94,7 +93,7 @@
  
  (move ecx res)
  
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset) nil)
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset))
    (storew ecx res bignum-digits-offset other-pointer-type))
  OKAY)

@@ -115,14 +114,14 @@
  (inst cmp x ecx)
  (inst jmp :e SINGLE-WORD-BIGNUM)

  (with-fixed-allocation (res bignum-type (+ bignum-digits-offset 2) nil)
  (with-fixed-allocation (res bignum-type (+ bignum-digits-offset 2))
    (storew eax res bignum-digits-offset other-pointer-type)
    (storew ecx res (1+ bignum-digits-offset) other-pointer-type))
  (inst jmp DONE)

  SINGLE-WORD-BIGNUM
  
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset) nil)
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset))
    (storew eax res bignum-digits-offset other-pointer-type))
  (inst jmp DONE)

@@ -140,8 +139,7 @@
			  (:res res (descriptor-reg any-reg) edx-offset)

			  (:temp eax unsigned-reg eax-offset)
			  (:temp ecx unsigned-reg ecx-offset)
			  (:temp temp unsigned-reg ebx-offset))
			  (:temp ecx unsigned-reg ecx-offset))
  (inst test x 3)
  (inst jmp :z FIXNUM)

@@ -161,7 +159,7 @@
  (inst shr res 2)			; sign bit is data - remove type bits
  (move ecx res)

  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset) nil)
  (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset))
    (storew ecx res bignum-digits-offset other-pointer-type))
  
  OKAY)
+2 −3
Original line number Diff line number Diff line
@@ -32,14 +32,13 @@
			 ((:arg type unsigned-reg eax-offset)
			  (:arg length any-reg ebx-offset)
			  (:arg words any-reg ecx-offset)
			  (:res result descriptor-reg edx-offset)
			  (:temp temp unsigned-reg edi-offset))
			  (:res result descriptor-reg edx-offset))
  (inst mov result (+ (1- (ash 1 lowtag-bits))
		      (* vector-data-offset word-bytes)))
  (inst add result words)
  (inst and result (lognot vm:lowtag-mask))
  (pseudo-atomic
   (allocation result result nil)
   (allocation result result)
   (inst lea result (make-ea :byte :base result :disp other-pointer-type))
   (storew type result 0 other-pointer-type)
   (storew length result vector-length-slot other-pointer-type))
+7 −13
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@
					     *enable-pseudo-atomic*)))
	       (pseudo-atomic
		(allocation res (* (pad-data-block cons-size) cons-cells)
			    nil
			    :node node
			    :dynamic-extent dynamic-extent)
		(inst lea res
@@ -142,7 +141,7 @@
	 (unboxed-arg :scs (any-reg) :target unboxed))
  (:results (result :scs (descriptor-reg) :from :eval))
  (:temporary (:sc unsigned-reg :from (:argument 0)) boxed)
  (:temporary (:sc unsigned-reg :from (:argument 1)) unboxed temp)
  (:temporary (:sc unsigned-reg :from (:argument 1)) unboxed)
  (:node-var node)
  (:generator 100
    (move boxed boxed-arg)
@@ -155,7 +154,7 @@
    (inst mov result boxed)
    (inst add result unboxed)
    (pseudo-atomic
     (allocation result result nil :node node)
     (allocation result result :node node)
     (inst lea result (make-ea :byte :base result :disp other-pointer-type))
     (inst shl boxed (- type-bits word-shift))
     (inst or boxed code-header-type)
@@ -184,10 +183,9 @@
  (:translate make-fdefn)
  (:args (name :scs (descriptor-reg) :to :eval))
  (:results (result :scs (descriptor-reg) :from :argument))
  (:temporary (:sc unsigned-reg) temp)
  (:node-var node)
  (:generator 37
    (with-fixed-allocation (result fdefn-type fdefn-size nil :node node)
    (with-fixed-allocation (result fdefn-type fdefn-size :node node)
      (storew name result fdefn-name-slot other-pointer-type)
      (storew nil-value result fdefn-function-slot other-pointer-type)
      (storew (make-fixup 'undefined-tramp :assembly-routine)
@@ -198,7 +196,6 @@
  (:args (function :to :save :scs (descriptor-reg)))
  (:info length dynamic-extent)
  (:temporary (:sc any-reg) temp)
  (:temporary (:sc unsigned-reg) temp2)
  (:results (result :scs (descriptor-reg)))
  (:node-var node)
  (:generator 10
@@ -206,7 +203,7 @@
				   *enable-pseudo-atomic*)))
     (pseudo-atomic
      (let ((size (+ length closure-info-offset)))
	(allocation result (pad-data-block size) nil :node node :dynamic-extent dynamic-extent)
	(allocation result (pad-data-block size) :node node :dynamic-extent dynamic-extent)
	(inst lea result
	      (make-ea :byte :base result :disp function-pointer-type))
	(storew (logior (ash (1- size) type-bits) closure-header-type)
@@ -219,11 +216,10 @@
(define-vop (make-value-cell)
  (:args (value :scs (descriptor-reg any-reg) :to :result))
  (:results (result :scs (descriptor-reg) :from :eval))
  (:temporary (:sc unsigned-reg) temp)
  (:node-var node)
  (:generator 10
    (with-fixed-allocation
	(result value-cell-header-type value-cell-size nil :node node)
	(result value-cell-header-type value-cell-size :node node)
      (storew value result value-cell-value-slot other-pointer-type))))


@@ -241,13 +237,12 @@
  (:info name words type lowtag dynamic-extent)
  (:ignore name)
  (:results (result :scs (descriptor-reg)))
  (:temporary (:sc unsigned-reg) temp)
  (:node-var node)
  (:generator 50
    (let ((*enable-pseudo-atomic* (unless dynamic-extent
				    *enable-pseudo-atomic*)))
      (pseudo-atomic
       (allocation result (pad-data-block words) nil :node node :dynamic-extent dynamic-extent)
       (allocation result (pad-data-block words) :node node :dynamic-extent dynamic-extent)
       (inst lea result (make-ea :byte :base result :disp lowtag))
       (when type
	 (storew (logior (ash (1- words) type-bits) type) result 0 lowtag))))))
@@ -260,7 +255,6 @@
  (:results (result :scs (descriptor-reg) :from (:eval 1)))
  (:temporary (:sc any-reg :from :eval :to (:eval 1)) bytes)
  (:temporary (:sc any-reg :from :eval :to :result) header)
  (:temporary (:sc unsigned-reg) temp)
  (:node-var node)
  (:generator 50
    (inst lea bytes
@@ -272,7 +266,7 @@
	  (make-ea :dword :base header :disp (+ (ash -2 type-bits) type)))
    (inst and bytes (lognot lowtag-mask))
    (pseudo-atomic
     (allocation result bytes nil :node node)
     (allocation result bytes :node node)
     (inst lea result (make-ea :byte :base result :disp lowtag))
     (storew header result 0 lowtag))))

+1 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
  (:arg-types positive-fixnum positive-fixnum)
  (:temporary (:sc any-reg :to :eval) bytes)
  (:temporary (:sc any-reg :to :result) header)
  (:temporary (:sc unsigned-reg) temp)
  (:results (result :scs (descriptor-reg) :from :eval))
  (:node-var node)
  (:generator 13
@@ -48,7 +47,7 @@
    (inst or  header type)
    (inst shr header 2)
    (pseudo-atomic
     (allocation result bytes nil :node node)
     (allocation result bytes :node node)
     (inst lea result (make-ea :dword :base result :disp other-pointer-type))
     (storew header result 0 other-pointer-type))))

Loading