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 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3974 if (CpuFeatures::IsSupported(SSE2)) { | 3974 if (CpuFeatures::IsSupported(SSE2)) { |
3975 CpuFeatures::Scope use_sse2(SSE2); | 3975 CpuFeatures::Scope use_sse2(SSE2); |
3976 __ movdbl(xmm0, Operand::StaticVariable(canonical_nan_reference)); | 3976 __ movdbl(xmm0, Operand::StaticVariable(canonical_nan_reference)); |
3977 } else { | 3977 } else { |
3978 __ fld_d(Operand::StaticVariable(canonical_nan_reference)); | 3978 __ fld_d(Operand::StaticVariable(canonical_nan_reference)); |
3979 } | 3979 } |
3980 __ jmp(&have_double_value, Label::kNear); | 3980 __ jmp(&have_double_value, Label::kNear); |
3981 | 3981 |
3982 __ bind(&smi_value); | 3982 __ bind(&smi_value); |
3983 // Value is a smi. convert to a double and store. | 3983 // Value is a smi. convert to a double and store. |
3984 __ SmiUntag(eax); | 3984 // Preserve original value. |
3985 __ push(eax); | 3985 __ mov(edx, eax); |
| 3986 __ SmiUntag(edx); |
| 3987 __ push(edx); |
3986 __ fild_s(Operand(esp, 0)); | 3988 __ fild_s(Operand(esp, 0)); |
3987 __ pop(eax); | 3989 __ pop(edx); |
3988 __ fstp_d(FieldOperand(edi, ecx, times_4, FixedDoubleArray::kHeaderSize)); | 3990 __ fstp_d(FieldOperand(edi, ecx, times_4, FixedDoubleArray::kHeaderSize)); |
3989 __ ret(0); | 3991 __ ret(0); |
3990 | 3992 |
3991 // Handle store cache miss, replacing the ic with the generic stub. | 3993 // Handle store cache miss, replacing the ic with the generic stub. |
3992 __ bind(&miss_force_generic); | 3994 __ bind(&miss_force_generic); |
3993 Handle<Code> ic_force_generic = | 3995 Handle<Code> ic_force_generic = |
3994 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3996 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
3995 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3997 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
3996 } | 3998 } |
3997 | 3999 |
3998 | 4000 |
3999 #undef __ | 4001 #undef __ |
4000 | 4002 |
4001 } } // namespace v8::internal | 4003 } } // namespace v8::internal |
4002 | 4004 |
4003 #endif // V8_TARGET_ARCH_IA32 | 4005 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |