From 396a1ccf67f18e8fc56a7b2e83e33b35760e59de Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Sat, 6 Oct 2012 00:04:25 -0400 Subject: [PATCH] x86-64: micro-optimize LEA DWORD-REG,EA If we are loading a DWORD EA into a DWORD register, we may not need the REX prefix. Unlikely to occur in current SBCL code, but does come up when you're writing your own VOPs for 32-bit operations. --- src/compiler/x86-64/insts.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/x86-64/insts.lisp b/src/compiler/x86-64/insts.lisp index a23f5f6..15efc7d 100644 --- a/src/compiler/x86-64/insts.lisp +++ b/src/compiler/x86-64/insts.lisp @@ -1799,7 +1799,7 @@ (:emitter (aver (or (dword-reg-p dst) (qword-reg-p dst))) (maybe-emit-rex-for-ea segment src dst - :operand-size :qword) + :operand-size (if (dword-reg-p dst) :dword :qword)) (emit-byte segment #b10001101) (emit-ea segment src (reg-tn-encoding dst)))) -- 1.7.10.4