From c9373b042af6237c8ce51267c92a12759f845a10 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Tue, 12 Aug 2008 13:37:16 +0000 Subject: [PATCH] For some reason the vm::ash-left-mod32 is never translated using the vop fast-ash-left-mod32-c/unsigned=>unsigned. (Need to look into that!) Instead, we call out to vm::ash-left-mod32. An example: (defun mat3neg (tt v) (declare (type (unsigned-byte 32) v) (type (integer -31 -1) tt) (optimize (speed 3) (safety 0))) (logand #xffffffff (ash v (- tt)))) As a workaround, declare vm:ash-left-mod32 as an inline function. Then vm::ash-left-mod32 is inlined, bignum::%ashl has a vop that does get called, so mat3neg has no calls. --- compiler/x86/arith.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/x86/arith.lisp b/compiler/x86/arith.lisp index c789a7d02..4857d89a1 100644 --- a/compiler/x86/arith.lisp +++ b/compiler/x86/arith.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/arith.lisp,v 1.18 2004/07/16 00:49:44 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/arith.lisp,v 1.19 2008/08/12 13:37:16 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1587,14 +1587,16 @@ ;; will produce 0 in the lower 32 bits of the register, which is ;; what we want.) (when (and (<= width 32) - (csubtypep (continuation-type count) (specifier-type '(unsigned-byte 5)))) + (csubtypep (continuation-type count) + (specifier-type '(unsigned-byte 5)))) (cut-to-width integer width) 'vm::ash-left-mod32)) ;; This should only get called when the ash modular function optimizer ;; succeeds, which is for a count of 0-31, which is just right for ;; %ashl. +(declaim (inline vm::ash-left-mod32)) (defun vm::ash-left-mod32 (integer count) (bignum::%ashl (ldb (byte 32 0) integer) count)) -) \ No newline at end of file +) -- GitLab