X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-modular.lisp;h=3f8d1d1a98129fead31a324b6e165e9a0c9f8ef5;hb=7a2ee8c1aff0bdd286cf5d43ab40bff7fed86bea;hp=931a90f13b64df02672d46d44898b1c83eea108c;hpb=1907ad030ca773162bcd9ff90fdc485a035591f4;p=sbcl.git diff --git a/src/code/cross-modular.lisp b/src/code/cross-modular.lisp index 931a90f..3f8d1d1 100644 --- a/src/code/cross-modular.lisp +++ b/src/code/cross-modular.lisp @@ -45,16 +45,13 @@ (do-mfuns *tagged-modular-class*))) `(progn ,@(forms))) -#!+#.(cl:if (cl:= sb!vm:n-machine-word-bits 32) '(and) '(or)) -(defun sb!vm::ash-left-mod32 (integer amount) - (ldb (byte 32 0) (ash integer amount))) -#!+#.(cl:if (cl:= sb!vm:n-machine-word-bits 64) '(and) '(or)) -(defun sb!vm::ash-left-mod64 (integer amount) - (ldb (byte 64 0) (ash integer amount))) -#!+x86 -(defun sb!vm::ash-left-smod30 (integer amount) - (mask-signed-field 30 (ash integer amount))) -#!+x86-64 -(defun sb!vm::ash-left-smod61 (integer amount) - (mask-signed-field 61 (ash integer amount))) +#.` +(defun ,(intern (format nil "ASH-LEFT-MOD~D" sb!vm:n-machine-word-bits) + "SB!VM") + (integer amount) + (ldb (byte ,sb!vm:n-machine-word-bits 0) (ash integer amount))) +#!+(or x86 x86-64) +(defun sb!vm::ash-left-modfx (integer amount) + (mask-signed-field (- sb!vm:n-word-bits sb!vm:n-fixnum-tag-bits) + (ash integer amount)))