From 8581ac213a0191fff5a162867854a87e149642aa Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Tue, 27 Sep 2011 12:25:42 +0000 Subject: [PATCH] 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 --- src/x64/stub-cache-x64.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 3819c1d40a..63d45ef074 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);