diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index c3d22a40..8f9bf8f5 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -1020,8 +1020,9 @@ Compiler::emitOp(OPCODE op) __ cld(); __ push(esi); __ push(edi); - __ lea(esi, Operand(dat, pri, NoScale)); + // Note: set edi first, since we need esi. __ lea(edi, Operand(dat, alt, NoScale)); + __ lea(esi, Operand(dat, pri, NoScale)); if (dwords) { __ movl(ecx, dwords); __ rep_movsd();