Reviewers: Erik Corry, iposva, Description: Fixed incorrect instruction usage in KeyedLoadIC for byte and word external array types. This failure unfortunately wasn't caught by the unit tests, but in real-world code. I'll try to add a unit test for this subsequently but would like to have this reviewed and checked in ASAP.
Please review this at http://codereview.chromium.org/437052 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/ia32/ic-ia32.cc M src/x64/ic-x64.cc Index: src/ia32/ic-ia32.cc =================================================================== --- src/ia32/ic-ia32.cc (revision 3353) +++ src/ia32/ic-ia32.cc (working copy) @@ -388,13 +388,13 @@ __ movsx_b(eax, Operand(ecx, eax, times_1, 0)); break; case kExternalUnsignedByteArray: - __ mov_b(eax, Operand(ecx, eax, times_1, 0)); + __ movzx_b(eax, Operand(ecx, eax, times_1, 0)); break; case kExternalShortArray: __ movsx_w(eax, Operand(ecx, eax, times_2, 0)); break; case kExternalUnsignedShortArray: - __ mov_w(eax, Operand(ecx, eax, times_2, 0)); + __ movzx_w(eax, Operand(ecx, eax, times_2, 0)); break; case kExternalIntArray: case kExternalUnsignedIntArray: Index: src/x64/ic-x64.cc =================================================================== --- src/x64/ic-x64.cc (revision 3353) +++ src/x64/ic-x64.cc (working copy) @@ -398,7 +398,7 @@ __ movsxbq(rax, Operand(rcx, rax, times_1, 0)); break; case kExternalUnsignedByteArray: - __ movb(rax, Operand(rcx, rax, times_1, 0)); + __ movzxbq(rax, Operand(rcx, rax, times_1, 0)); break; case kExternalShortArray: __ movsxwq(rax, Operand(rcx, rax, times_2, 0)); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
