X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fassembly%2Fx86-64%2Farith.lisp;h=22fee8769231866c15eeaede72af7e764d95fcba;hb=1c09520cfbe88c76e5ac8b8b6c3c0d67f67a0d44;hp=4e8f81dac78bdc368f7a79d15ea272df0c0865c2;hpb=d8ad375f27c0006f8896047686a065b8243c7e0f;p=sbcl.git diff --git a/src/assembly/x86-64/arith.lisp b/src/assembly/x86-64/arith.lisp index 4e8f81d..22fee87 100644 --- a/src/assembly/x86-64/arith.lisp +++ b/src/assembly/x86-64/arith.lisp @@ -28,15 +28,16 @@ (:res res (descriptor-reg any-reg) rdx-offset) (:temp rax unsigned-reg rax-offset) - (:temp rbx unsigned-reg rbx-offset) (:temp rcx unsigned-reg rcx-offset)) - (declare (ignorable rbx)) - - (inst test x 7) ; fixnum? + (inst mov rcx x) + (inst or rcx y) + (inst test rcx 7) ; both fixnums? (inst jmp :nz DO-STATIC-FUN) ; no - do generic - (inst test y 7) ; fixnum? - (inst jmp :z DO-BODY) ; yes - doit here + + ,@body + (inst clc) + (inst ret) DO-STATIC-FUN (inst pop rax) @@ -51,10 +52,7 @@ (make-ea :qword :disp (+ nil-value (static-fun-offset - ',(symbolicate "TWO-ARG-" fun))))) - - DO-BODY - ,@body))) + ',(symbolicate "TWO-ARG-" fun)))))))) (define-generic-arith-routine (+ 10) (move res x)