From: Douglas K. <sn...@us...> - 2015-01-09 16:18:50
|
The branch "master" has been updated in SBCL: via cee1be2050b30d83e260a914a8d498c1b86d2b26 (commit) from 421c78c5223db19e624ae8b313d825428eec6b59 (commit) - Log ----------------------------------------------------------------- commit cee1be2050b30d83e260a914a8d498c1b86d2b26 Author: Douglas Katzman <do...@go...> Date: Fri Jan 9 10:50:36 2015 -0500 Same change for x86 as was done for x86-64 assembly routines. --- src/assembly/x86/arith.lisp | 93 ++++++++---------------------------------- 1 files changed, 18 insertions(+), 75 deletions(-) diff --git a/src/assembly/x86/arith.lisp b/src/assembly/x86/arith.lisp index fea4789..2f034fb 100644 --- a/src/assembly/x86/arith.lisp +++ b/src/assembly/x86/arith.lisp @@ -151,10 +151,12 @@ ;;;; comparison (macrolet ((define-cond-assem-rtn (name translate static-fn test) - (declare (ignorable static-fn)) ; not used if #-sb-assembling - #+sb-assembling `(define-assembly-routine (,name - (:return-style :none)) + (:translate ,translate) + (:policy :safe) + (:save-p t) + (:conditional ,test) + (:cost 10)) ((:arg x (descriptor-reg any-reg) edx-offset) (:arg y (descriptor-reg any-reg) edi-offset) @@ -193,34 +195,16 @@ (:l `((inst mov y (1+ nil-value)) (inst cmp y x))) (:g `((inst cmp x (1+ nil-value))))) - (inst pop ebp-tn) - (inst ret)) - #-sb-assembling - `(define-vop (,name) - (:translate ,translate) - (:policy :safe) - (:save-p t) - (:args (x :scs (descriptor-reg any-reg) :target edx) - (y :scs (descriptor-reg any-reg) :target edi)) - - (:temporary (:sc unsigned-reg :offset edx-offset - :from (:argument 0)) - edx) - (:temporary (:sc unsigned-reg :offset edi-offset - :from (:argument 1)) - edi) - (:conditional ,test) - (:generator 10 - (move edx x) - (move edi y) - (inst call (make-fixup ',name :assembly-routine)))))) - + (inst pop ebp-tn)))) (define-cond-assem-rtn generic-< < two-arg-< :l) (define-cond-assem-rtn generic-> > two-arg-> :g)) -#+sb-assembling (define-assembly-routine (generic-eql - (:return-style :none)) + (:translate eql) + (:policy :safe) + (:save-p t) + (:conditional :e) + (:cost 10)) ((:arg x (descriptor-reg any-reg) edx-offset) (:arg y (descriptor-reg any-reg) edi-offset) @@ -260,33 +244,14 @@ :disp (+ nil-value (static-fun-offset 'eql)))) (load-symbol y t) (inst cmp x y) - (inst pop ebp-tn) - (inst ret)) + (inst pop ebp-tn)) -#-sb-assembling -(define-vop (generic-eql) - (:translate eql) - (:policy :safe) - (:save-p t) - (:args (x :scs (descriptor-reg any-reg) :target edx) - (y :scs (descriptor-reg any-reg) :target edi)) - - (:temporary (:sc unsigned-reg :offset edx-offset - :from (:argument 0)) - edx) - (:temporary (:sc unsigned-reg :offset edi-offset - :from (:argument 1)) - edi) - - (:conditional :e) - (:generator 10 - (move edx x) - (move edi y) - (inst call (make-fixup 'generic-eql :assembly-routine)))) - -#+sb-assembling (define-assembly-routine (generic-= - (:return-style :none)) + (:translate =) + (:policy :safe) + (:save-p t) + (:conditional :e) + (:cost 10)) ((:arg x (descriptor-reg any-reg) edx-offset) (:arg y (descriptor-reg any-reg) edi-offset) @@ -320,29 +285,7 @@ :disp (+ nil-value (static-fun-offset 'two-arg-=)))) (load-symbol y t) (inst cmp x y) - (inst pop ebp-tn) - (inst ret)) - -#-sb-assembling -(define-vop (generic-=) - (:translate =) - (:policy :safe) - (:save-p t) - (:args (x :scs (descriptor-reg any-reg) :target edx) - (y :scs (descriptor-reg any-reg) :target edi)) - - (:temporary (:sc unsigned-reg :offset edx-offset - :from (:argument 0)) - edx) - (:temporary (:sc unsigned-reg :offset edi-offset - :from (:argument 1)) - edi) - - (:conditional :e) - (:generator 10 - (move edx x) - (move edi y) - (inst call (make-fixup 'generic-= :assembly-routine)))) + (inst pop ebp-tn)) ;;; Support for the Mersenne Twister, MT19937, random number generator ----------------------------------------------------------------------- hooks/post-receive -- SBCL |