From: yangguo@chromium.org Date: Tue, 27 Sep 2011 12:25:42 +0000 (+0000) Subject: Fixed a bug in smi-only implementation in x64. X-Git-Tag: upstream/4.7.83~18349 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8581ac213a0191fff5a162867854a87e149642aa;p=platform%2Fupstream%2Fv8.git Fixed a bug in smi-only implementation in x64. Review URL: http://codereview.chromium.org/8060009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 3819c1d..63d45ef 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -3722,13 +3722,14 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement( } // Do the store and update the write barrier. - __ SmiToInteger32(rcx, rcx); if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { __ JumpIfNotSmi(rax, &miss_force_generic); + __ SmiToInteger32(rcx, rcx); __ movq(FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize), rax); } else { ASSERT(elements_kind == FAST_ELEMENTS); + __ SmiToInteger32(rcx, rcx); __ lea(rcx, FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize)); __ movq(Operand(rcx, 0), rax);