| OLD | NEW |
| 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 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 __ bind(&is_nan); | 3769 __ bind(&is_nan); |
| 3770 // Convert all NaNs to the same canonical NaN value when they are stored in | 3770 // Convert all NaNs to the same canonical NaN value when they are stored in |
| 3771 // the double array. | 3771 // the double array. |
| 3772 __ Set(kScratchRegister, BitCast<uint64_t>( | 3772 __ Set(kScratchRegister, BitCast<uint64_t>( |
| 3773 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); | 3773 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); |
| 3774 __ movq(xmm0, kScratchRegister); | 3774 __ movq(xmm0, kScratchRegister); |
| 3775 __ jmp(&have_double_value, Label::kNear); | 3775 __ jmp(&have_double_value, Label::kNear); |
| 3776 | 3776 |
| 3777 __ bind(&smi_value); | 3777 __ bind(&smi_value); |
| 3778 // Value is a smi. convert to a double and store. | 3778 // Value is a smi. convert to a double and store. |
| 3779 __ SmiToInteger32(rax, rax); | 3779 // Preserve original value. |
| 3780 __ push(rax); | 3780 __ SmiToInteger32(rdx, rax); |
| 3781 __ push(rdx); |
| 3781 __ fild_s(Operand(rsp, 0)); | 3782 __ fild_s(Operand(rsp, 0)); |
| 3782 __ pop(rax); | 3783 __ pop(rdx); |
| 3783 __ SmiToInteger32(rcx, rcx); | 3784 __ SmiToInteger32(rcx, rcx); |
| 3784 __ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize)); | 3785 __ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize)); |
| 3785 __ ret(0); | 3786 __ ret(0); |
| 3786 | 3787 |
| 3787 // Handle store cache miss, replacing the ic with the generic stub. | 3788 // Handle store cache miss, replacing the ic with the generic stub. |
| 3788 __ bind(&miss_force_generic); | 3789 __ bind(&miss_force_generic); |
| 3789 Handle<Code> ic_force_generic = | 3790 Handle<Code> ic_force_generic = |
| 3790 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3791 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
| 3791 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3792 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
| 3792 } | 3793 } |
| 3793 | 3794 |
| 3794 | 3795 |
| 3795 #undef __ | 3796 #undef __ |
| 3796 | 3797 |
| 3797 } } // namespace v8::internal | 3798 } } // namespace v8::internal |
| 3798 | 3799 |
| 3799 #endif // V8_TARGET_ARCH_X64 | 3800 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |