Fix OP_MOVS to not clobber random memory (bug 5868, r=psychonic).
authorDavid Anderson <danderson@mozilla.com>
Mon Aug 19 12:59:10 2013 -0700 (2013-08-19)
changeset 4024152f31d6b8ca
parent 4023 3c83ddef5985
child 4025 542dde661d5c
Fix OP_MOVS to not clobber random memory (bug 5868, r=psychonic).
sourcepawn/jit/x86/jit_x86.cpp
     1.1 --- a/sourcepawn/jit/x86/jit_x86.cpp	Fri Aug 16 11:47:35 2013 -0400
     1.2 +++ b/sourcepawn/jit/x86/jit_x86.cpp	Mon Aug 19 12:59:10 2013 -0700
     1.3 @@ -1020,8 +1020,9 @@
     1.4        __ cld();
     1.5        __ push(esi);
     1.6        __ push(edi);
     1.7 +      // Note: set edi first, since we need esi.
     1.8 +      __ lea(edi, Operand(dat, alt, NoScale));
     1.9        __ lea(esi, Operand(dat, pri, NoScale));
    1.10 -      __ lea(edi, Operand(dat, alt, NoScale));
    1.11        if (dwords) {
    1.12          __ movl(ecx, dwords);
    1.13          __ rep_movsd();