Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 7551009: Ensure that GenerateStoreFastDoubleElement returns stored value on all paths. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | test/mjsunit/regress/regress-91013.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3734 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 __ bind(&is_nan); 3745 __ bind(&is_nan);
3746 // Convert all NaNs to the same canonical NaN value when they are stored in 3746 // Convert all NaNs to the same canonical NaN value when they are stored in
3747 // the double array. 3747 // the double array.
3748 __ Set(kScratchRegister, BitCast<uint64_t>( 3748 __ Set(kScratchRegister, BitCast<uint64_t>(
3749 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); 3749 FixedDoubleArray::canonical_not_the_hole_nan_as_double()));
3750 __ movq(xmm0, kScratchRegister); 3750 __ movq(xmm0, kScratchRegister);
3751 __ jmp(&have_double_value, Label::kNear); 3751 __ jmp(&have_double_value, Label::kNear);
3752 3752
3753 __ bind(&smi_value); 3753 __ bind(&smi_value);
3754 // Value is a smi. convert to a double and store. 3754 // Value is a smi. convert to a double and store.
3755 __ SmiToInteger32(rax, rax); 3755 // Preserve original value.
3756 __ push(rax); 3756 __ SmiToInteger32(rdx, rax);
3757 __ push(rdx);
3757 __ fild_s(Operand(rsp, 0)); 3758 __ fild_s(Operand(rsp, 0));
3758 __ pop(rax); 3759 __ pop(rdx);
3759 __ SmiToInteger32(rcx, rcx); 3760 __ SmiToInteger32(rcx, rcx);
3760 __ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize)); 3761 __ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize));
3761 __ ret(0); 3762 __ ret(0);
3762 3763
3763 // Handle store cache miss, replacing the ic with the generic stub. 3764 // Handle store cache miss, replacing the ic with the generic stub.
3764 __ bind(&miss_force_generic); 3765 __ bind(&miss_force_generic);
3765 Handle<Code> ic_force_generic = 3766 Handle<Code> ic_force_generic =
3766 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 3767 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
3767 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 3768 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
3768 } 3769 }
3769 3770
3770 3771
3771 #undef __ 3772 #undef __
3772 3773
3773 } } // namespace v8::internal 3774 } } // namespace v8::internal
3774 3775
3775 #endif // V8_TARGET_ARCH_X64 3776 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | test/mjsunit/regress/regress-91013.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698