* Single branch to check if both arguments are fixnums, rerorder fixnum branch to
be the fallthru.
;;;; -*- coding: utf-8; -*-
+ * optimization: faster generic arithmetic dispatch on x86 and x86-64.
* bug fix: lexical type declarations are now correctly reported by
SB-CLTL2. (reported by Larry D'Anna)
* bug fix: STRING-TO-OCTETS did not handle :START properly when
(: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)
(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)
(:res res (descriptor-reg any-reg) edx-offset)
(:temp eax unsigned-reg eax-offset)
- (:temp ebx unsigned-reg ebx-offset)
(:temp ecx unsigned-reg ecx-offset))
- (declare (ignorable ebx))
-
- (inst test x 3) ; fixnum?
+ (inst mov ecx x)
+ (inst or ecx y)
+ (inst test ecx 3) ; both fixnums?
(inst jmp :nz DO-STATIC-FUN) ; no - do generic
- (inst test y 3) ; fixnum?
- (inst jmp :z DO-BODY) ; yes - doit here
+
+ ,@body
+ (inst clc) ; single-value return
+ (inst ret)
DO-STATIC-FUN
(inst pop eax)
(make-ea :dword
: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)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.23.2"
+"1.0.23.3"