X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Farith.lisp;h=392f67cfdba221a45760e958b21988ae2397f298;hb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;hp=41eea9773f4249770a19ce8650ffe91bbac89de7;hpb=3c65762b927af861c9c8bc416e4cbac9a14ec0c3;p=sbcl.git diff --git a/src/assembly/x86/arith.lisp b/src/assembly/x86/arith.lisp index 41eea97..392f67c 100644 --- a/src/assembly/x86/arith.lisp +++ b/src/assembly/x86/arith.lisp @@ -43,14 +43,14 @@ (inst push ebp-tn) (inst lea ebp-tn - (make-ea :dword :base esp-tn :disp word-bytes)) + (make-ea :dword :base esp-tn :disp n-word-bytes)) (inst sub esp-tn (fixnumize 2)) (inst push eax) ; callers return addr (inst mov ecx (fixnumize 2)) ; arg count (inst jmp (make-ea :dword :disp (+ nil-value - (static-function-offset + (static-fun-offset ',(symbolicate "TWO-ARG-" fun))))) DO-BODY @@ -139,12 +139,12 @@ (inst pop eax) (inst push ebp-tn) - (inst lea ebp-tn (make-ea :dword :base esp-tn :disp word-bytes)) + (inst lea ebp-tn (make-ea :dword :base esp-tn :disp n-word-bytes)) (inst sub esp-tn (fixnumize 2)) (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-fun-offset '%negate)))) FIXNUM (move res x) @@ -187,7 +187,9 @@ TAIL-CALL-TO-STATIC-FN (inst pop eax) (inst push ebp-tn) - (inst lea ebp-tn (make-ea :dword :base esp-tn :disp word-bytes)) + (inst lea ebp-tn (make-ea :dword + :base esp-tn + :disp n-word-bytes)) (inst sub esp-tn (fixnumize 2)) ; FIXME: Push 2 words on stack, ; weirdly? (inst push eax) @@ -196,8 +198,7 @@ ; should be named parallelly. (inst jmp (make-ea :dword :disp (+ nil-value - (static-function-offset - ',static-fn)))) + (static-fun-offset ',static-fn)))) INLINE-FIXNUM-COMPARE (inst cmp x y) @@ -248,12 +249,12 @@ DO-STATIC-FN (inst pop eax) (inst push ebp-tn) - (inst lea ebp-tn (make-ea :dword :base esp-tn :disp word-bytes)) + (inst lea ebp-tn (make-ea :dword :base esp-tn :disp n-word-bytes)) (inst sub esp-tn (fixnumize 2)) (inst push eax) (inst mov ecx (fixnumize 2)) (inst jmp (make-ea :dword - :disp (+ nil-value (static-function-offset 'eql)))) + :disp (+ nil-value (static-fun-offset 'eql)))) RETURN-T (load-symbol res t) @@ -289,12 +290,12 @@ DO-STATIC-FN (inst pop eax) (inst push ebp-tn) - (inst lea ebp-tn (make-ea :dword :base esp-tn :disp word-bytes)) + (inst lea ebp-tn (make-ea :dword :base esp-tn :disp n-word-bytes)) (inst sub esp-tn (fixnumize 2)) (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-fun-offset 'two-arg-=)))) RETURN-T (load-symbol res t)) @@ -333,13 +334,13 @@ (inst xor k k) LOOP1 (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-lowtag))) + :disp (- (* (+ 3 vector-data-offset) + n-word-bytes) + 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-lowtag))) + :disp (- (* (+ 1 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -348,26 +349,26 @@ (inst xor y #x9908b0df) SKIP1 (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-lowtag))) + :disp (- (* (+ 397 3 vector-data-offset) + n-word-bytes) + 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-lowtag)) + :disp (- (* (+ 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag)) y) (inst inc k) (inst cmp k (- 624 397)) (inst jmp :b loop1) LOOP2 (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-lowtag))) + :disp (- (* (+ 3 vector-data-offset) + n-word-bytes) + 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-lowtag))) + :disp (- (* (+ 1 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -376,26 +377,26 @@ (inst xor y #x9908b0df) SKIP2 (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-lowtag))) + :disp (- (* (+ (- 397 624) 3 vector-data-offset) + n-word-bytes) + 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-lowtag)) + :disp (- (* (+ 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag)) y) (inst inc k) (inst cmp k (- 624 1)) (inst jmp :b loop2) (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-lowtag))) + :disp (- (* (+ (- 624 1) 3 vector-data-offset) + n-word-bytes) + 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-lowtag))) + :disp (- (* (+ 0 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -404,13 +405,13 @@ (inst xor y #x9908b0df) SKIP3 (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-lowtag))) + :disp (- (* (+ (- 397 1) 3 vector-data-offset) + n-word-bytes) + 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-lowtag)) + :disp (- (* (+ (- 624 1) 3 vector-data-offset) + n-word-bytes) + other-pointer-lowtag)) y) ;; Restore the temporary registers and return.