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 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset)); | 3385 __ fstp_d(FieldOperand(eax, HeapNumber::kValueOffset)); |
3386 __ ret(0); | 3386 __ ret(0); |
3387 } else { | 3387 } else { |
3388 __ SmiTag(eax); | 3388 __ SmiTag(eax); |
3389 __ ret(0); | 3389 __ ret(0); |
3390 } | 3390 } |
3391 | 3391 |
3392 // If we fail allocation of the HeapNumber, we still have a value on | 3392 // If we fail allocation of the HeapNumber, we still have a value on |
3393 // top of the FPU stack. Remove it. | 3393 // top of the FPU stack. Remove it. |
3394 __ bind(&failed_allocation); | 3394 __ bind(&failed_allocation); |
3395 __ ffree(); | 3395 __ fstp(0); |
3396 __ fincstp(); | |
3397 // Fall through to slow case. | 3396 // Fall through to slow case. |
3398 | 3397 |
3399 // Slow case: Jump to runtime. | 3398 // Slow case: Jump to runtime. |
3400 __ bind(&slow); | 3399 __ bind(&slow); |
3401 Counters* counters = masm->isolate()->counters(); | 3400 Counters* counters = masm->isolate()->counters(); |
3402 __ IncrementCounter(counters->keyed_load_external_array_slow(), 1); | 3401 __ IncrementCounter(counters->keyed_load_external_array_slow(), 1); |
3403 | 3402 |
3404 // ----------- S t a t e ------------- | 3403 // ----------- S t a t e ------------- |
3405 // -- eax : key | 3404 // -- eax : key |
3406 // -- edx : receiver | 3405 // -- edx : receiver |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3703 } else { | 3702 } else { |
3704 __ fstp_d(FieldOperand(ecx, HeapNumber::kValueOffset)); | 3703 __ fstp_d(FieldOperand(ecx, HeapNumber::kValueOffset)); |
3705 } | 3704 } |
3706 __ mov(eax, ecx); | 3705 __ mov(eax, ecx); |
3707 __ ret(0); | 3706 __ ret(0); |
3708 | 3707 |
3709 __ bind(&slow_allocate_heapnumber); | 3708 __ bind(&slow_allocate_heapnumber); |
3710 // A value was pushed on the floating point stack before the allocation, if | 3709 // A value was pushed on the floating point stack before the allocation, if |
3711 // the allocation fails it needs to be removed. | 3710 // the allocation fails it needs to be removed. |
3712 if (!CpuFeatures::IsSupported(SSE2)) { | 3711 if (!CpuFeatures::IsSupported(SSE2)) { |
3713 __ ffree(); | 3712 __ fstp(0); |
3714 __ fincstp(); | |
3715 } | 3713 } |
3716 Handle<Code> slow_ic = | 3714 Handle<Code> slow_ic = |
3717 masm->isolate()->builtins()->KeyedLoadIC_Slow(); | 3715 masm->isolate()->builtins()->KeyedLoadIC_Slow(); |
3718 __ jmp(slow_ic, RelocInfo::CODE_TARGET); | 3716 __ jmp(slow_ic, RelocInfo::CODE_TARGET); |
3719 | 3717 |
3720 __ bind(&miss_force_generic); | 3718 __ bind(&miss_force_generic); |
3721 Handle<Code> miss_ic = | 3719 Handle<Code> miss_ic = |
3722 masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric(); | 3720 masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric(); |
3723 __ jmp(miss_ic, RelocInfo::CODE_TARGET); | 3721 __ jmp(miss_ic, RelocInfo::CODE_TARGET); |
3724 } | 3722 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 3845 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
3848 __ jmp(ic_miss, RelocInfo::CODE_TARGET); | 3846 __ jmp(ic_miss, RelocInfo::CODE_TARGET); |
3849 } | 3847 } |
3850 | 3848 |
3851 | 3849 |
3852 #undef __ | 3850 #undef __ |
3853 | 3851 |
3854 } } // namespace v8::internal | 3852 } } // namespace v8::internal |
3855 | 3853 |
3856 #endif // V8_TARGET_ARCH_IA32 | 3854 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |