X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Farith.lisp;h=46aa23c4c1fa53729ecde27d83fe8bc214012b5b;hb=2cb068e245e00505076e9c325424df2a1260bfb1;hp=1365fba2b7a2b58f6b30f95e134383033422540c;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/src/assembly/x86/arith.lisp b/src/assembly/x86/arith.lisp index 1365fba..46aa23c 100644 --- a/src/assembly/x86/arith.lisp +++ b/src/assembly/x86/arith.lisp @@ -197,23 +197,16 @@ INLINE-FIXNUM-COMPARE (inst cmp x y) - (inst jmp ,test RETURN-TRUE) (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 - ;; produced by GENERATE-RETURN-SEQUENCE, but in that case it's - ;; not clear why we don't just jump to the end of this function - ;; to share the return sequence there. - (inst pop eax) - (inst add eax 2) - (inst jmp eax) + (inst jmp ,test RETURN-FALSE) + + (load-symbol res t) - RETURN-TRUE - (load-symbol res t)))) + RETURN-FALSE + DONE))) - (define-cond-assem-rtn generic-< < two-arg-< :l) - (define-cond-assem-rtn generic-> > two-arg-> :g)) + (define-cond-assem-rtn generic-< < two-arg-< :ge) + (define-cond-assem-rtn generic-> > two-arg-> :le)) (define-assembly-routine (generic-eql (:cost 10) @@ -237,9 +230,7 @@ RETURN-NIL (inst mov res nil-value) - (inst pop eax) - (inst add eax 2) - (inst jmp eax) + (inst jmp DONE) DO-STATIC-FN (inst pop eax) @@ -253,8 +244,8 @@ RETURN-T (load-symbol res t) - ;; FIXME: I don't understand how we return from here.. - ) + + DONE) (define-assembly-routine (generic-= (:cost 10) @@ -278,9 +269,7 @@ (inst jmp :e RETURN-T) ; ok (inst mov res nil-value) - (inst pop eax) - (inst add eax 2) - (inst jmp eax) + (inst jmp DONE) DO-STATIC-FN (inst pop eax) @@ -293,7 +282,9 @@ :disp (+ nil-value (static-fun-offset 'two-arg-=)))) RETURN-T - (load-symbol res t)) + (load-symbol res t) + + DONE) ;;; Support for the Mersenne Twister, MT19937, random number generator