0.9.1.55: trivial cleanup, new documentation directory
[sbcl.git] / src / assembly / x86 / arith.lisp
index 92c270a..dbc752c 100644 (file)
@@ -50,7 +50,7 @@
                (inst jmp
                      (make-ea :dword
                               :disp (+ nil-value
-                                       (static-function-offset
+                                       (static-fun-offset
                                         ',(symbolicate "TWO-ARG-" fun)))))
 
                DO-BODY
     OKAY)
 
   (define-generic-arith-routine (- 10)
-    ;; FIXME: This is screwed up.
-      ;;; I can't figure out the flags on subtract. Overflow never gets
-      ;;; set and carry always does. (- 0 most-negative-fixnum) can't be
-      ;;; easily detected so just let the upper level stuff do it.
-    (inst jmp DO-STATIC-FUN)
-
     (move res x)
     (inst sub res y)
     (inst jmp :no OKAY)
+    (inst cmc)                        ; carry has correct sign now
     (inst rcr res 1)
     (inst sar res 1)                 ; remove type bits
 
   (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)
                                        ; 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)
   (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)
   (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))