X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Farith.lisp;h=04e0861dd0ba70c15154b4e35aea08949ac4861b;hb=6fb6e66f531dfb6140ec3e0cc8f84f6ecd1927ca;hp=55e86e0d76f840dfef08ce55d90670f900e3e5f4;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/assembly/x86/arith.lisp b/src/assembly/x86/arith.lisp index 55e86e0..04e0861 100644 --- a/src/assembly/x86/arith.lisp +++ b/src/assembly/x86/arith.lisp @@ -10,9 +10,6 @@ ;;;; files for more information. (in-package "SB!VM") - -(file-comment - "$Header$") ;;;; addition, subtraction, and multiplication @@ -52,7 +49,7 @@ (inst mov ecx (fixnumize 2)) ; arg count (inst jmp (make-ea :dword - :disp (+ *nil-value* + :disp (+ nil-value (static-function-offset ',(symbolicate "TWO-ARG-" fun))))) @@ -69,7 +66,7 @@ (move ecx res) (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset)) - (storew ecx res bignum-digits-offset other-pointer-type)) + (storew ecx res bignum-digits-offset other-pointer-lowtag)) OKAY) @@ -89,7 +86,7 @@ (move ecx res) (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset)) - (storew ecx res bignum-digits-offset other-pointer-type)) + (storew ecx res bignum-digits-offset other-pointer-lowtag)) OKAY) (define-generic-arith-routine (* 30) @@ -110,14 +107,14 @@ (inst jmp :e SINGLE-WORD-BIGNUM) (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)) + (storew eax res bignum-digits-offset other-pointer-lowtag) + (storew ecx res (1+ bignum-digits-offset) other-pointer-lowtag)) (inst jmp DONE) SINGLE-WORD-BIGNUM (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset)) - (storew eax res bignum-digits-offset other-pointer-type)) + (storew eax res bignum-digits-offset other-pointer-lowtag)) (inst jmp DONE) OKAY @@ -147,7 +144,7 @@ (inst push eax) (inst mov ecx (fixnumize 1)) ; arg count (inst jmp (make-ea :dword - :disp (+ *nil-value* (static-function-offset '%negate)))) + :disp (+ nil-value (static-function-offset '%negate)))) FIXNUM (move res x) @@ -157,7 +154,7 @@ (move ecx res) (with-fixed-allocation (res bignum-type (1+ bignum-digits-offset)) - (storew ecx res bignum-digits-offset other-pointer-type)) + (storew ecx res bignum-digits-offset other-pointer-lowtag)) OKAY) @@ -198,14 +195,14 @@ ; SINGLE-FLOAT-BITS are parallel, ; should be named parallelly. (inst jmp (make-ea :dword - :disp (+ *nil-value* + :disp (+ nil-value (static-function-offset ',static-fn)))) INLINE-FIXNUM-COMPARE (inst cmp x y) (inst jmp ,test RETURN-TRUE) - (inst mov res *nil-value*) + (inst mov res nil-value) ;; FIXME: A note explaining this return convention, or a ;; symbolic name for it, would be nice. (It looks as though we ;; should be hand-crafting the same return sequence as would be @@ -243,7 +240,7 @@ (inst jmp :nz DO-STATIC-FN) RETURN-NIL - (inst mov res *nil-value*) + (inst mov res nil-value) (inst pop eax) (inst add eax 2) (inst jmp eax) @@ -256,7 +253,7 @@ (inst push eax) (inst mov ecx (fixnumize 2)) (inst jmp (make-ea :dword - :disp (+ *nil-value* (static-function-offset 'eql)))) + :disp (+ nil-value (static-function-offset 'eql)))) RETURN-T (load-symbol res t) @@ -278,13 +275,13 @@ (:temp ecx unsigned-reg ecx-offset) ) (inst test x 3) ; descriptor? - (inst jmp :nz DO-STATIC-FN) ; yes do it here + (inst jmp :nz DO-STATIC-FN) ; yes, do it here (inst test y 3) ; descriptor? (inst jmp :nz DO-STATIC-FN) (inst cmp x y) (inst jmp :e RETURN-T) ; ok - (inst mov res *nil-value*) + (inst mov res nil-value) (inst pop eax) (inst add eax 2) (inst jmp eax) @@ -297,7 +294,7 @@ (inst push eax) (inst mov ecx (fixnumize 2)) (inst jmp (make-ea :dword - :disp (+ *nil-value* (static-function-offset 'two-arg-=)))) + :disp (+ nil-value (static-function-offset 'two-arg-=)))) RETURN-T (load-symbol res t)) @@ -338,11 +335,11 @@ (inst mov y (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov tmp (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 1 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -353,11 +350,11 @@ (inst xor y (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 397 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type)) + sb!vm:other-pointer-lowtag)) y) (inst inc k) (inst cmp k (- 624 397)) @@ -366,11 +363,11 @@ (inst mov y (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov tmp (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 1 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -381,11 +378,11 @@ (inst xor y (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ (- 397 624) 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov (make-ea :dword :base state :index k :scale 4 :disp (- (* (+ 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type)) + sb!vm:other-pointer-lowtag)) y) (inst inc k) (inst cmp k (- 624 1)) @@ -394,11 +391,11 @@ (inst mov y (make-ea :dword :base state :disp (- (* (+ (- 624 1) 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov tmp (make-ea :dword :base state :disp (- (* (+ 0 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -409,11 +406,11 @@ (inst xor y (make-ea :dword :base state :disp (- (* (+ (- 397 1) 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type))) + sb!vm:other-pointer-lowtag))) (inst mov (make-ea :dword :base state :disp (- (* (+ (- 624 1) 3 sb!vm:vector-data-offset) sb!vm:word-bytes) - sb!vm:other-pointer-type)) + sb!vm:other-pointer-lowtag)) y) ;; Restore the temporary registers and return.