X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Farith.lisp;h=565a2e920e6fcdfd7f6b4e6617fe26bd6cfd6304;hb=20b2378572cf7378f3f267e2234c4234dacfbdc9;hp=dedb74a3f507b681cd5a2edf9f69241c997b54f4;hpb=787090e008e13b1c91ba04cf7776ca0af7336342;p=sbcl.git diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index dedb74a..565a2e9 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -1253,6 +1253,17 @@ (cut-to-width index width) 'sb!vm::%lea-mod32)) +#+sb-xc-host +(defun sb!vm::%lea-mod32 (base index scale disp) + (ldb (byte 32 0) (%lea base index scale disp))) +#-sb-xc-host +(defun sb!vm::%lea-mod32 (base index scale disp) + (let ((base (logand base #xffffffff)) + (index (logand index #xffffffff))) + ;; can't use modular version of %LEA, as we only have VOPs for + ;; constant SCALE and DISP. + (ldb (byte 32 0) (+ base (* index scale) disp)))) + (in-package "SB!VM") (define-vop (%lea-mod32/unsigned=>unsigned