X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86%2Farith.lisp;h=7c6b4335d17ae0df60a47132c94d0bb6de3dc298;hb=1831934a29eb9361472e4f49efbcd5398392a6b0;hp=46f5326ae6c55f306d62040357eeac14dffabcf7;hpb=0d871fd7a98fc4af92a8b942a1154761466ad8c9;p=sbcl.git diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 46f5326..7c6b433 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -1421,7 +1421,7 @@ ;;; For add and sub with carry the sc of carry argument is any-reg so -;;; the it may be passed as a fixnum or word and thus may be 0, 1, or +;;; that it may be passed as a fixnum or word and thus may be 0, 1, or ;;; 4. This is easy to deal with and may save a fixnum-word ;;; conversion. (define-vop (add-w/carry) @@ -1443,8 +1443,8 @@ (inst mov carry 0) (inst adc carry carry))) -;;; Note: the borrow is the oppostite of the x86 convention - 1 for no -;;; borrow and 0 for a borrow. +;;; Note: the borrow is 1 for no borrow and 0 for a borrow, the opposite +;;; of the x86 convention. (define-vop (sub-w/borrow) (:translate sb!bignum:%subtract-with-borrow) (:policy :fast-safe) @@ -1459,9 +1459,8 @@ (inst cmp c 1) ; Set the carry flag to 1 if c=0 else to 0 (move result a) (inst sbb result b) - (inst mov borrow 0) - (inst adc borrow borrow) - (inst xor borrow 1))) + (inst mov borrow 1) + (inst sbb borrow 0))) (define-vop (bignum-mult-and-add-3-arg)