OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 __ CheckMap(key, | 3049 __ CheckMap(key, |
3050 masm->isolate()->factory()->heap_number_map(), | 3050 masm->isolate()->factory()->heap_number_map(), |
3051 fail, | 3051 fail, |
3052 DONT_DO_SMI_CHECK); | 3052 DONT_DO_SMI_CHECK); |
3053 __ movsd(xmm_scratch0, FieldOperand(key, HeapNumber::kValueOffset)); | 3053 __ movsd(xmm_scratch0, FieldOperand(key, HeapNumber::kValueOffset)); |
3054 __ cvttsd2si(scratch, xmm_scratch0); | 3054 __ cvttsd2si(scratch, xmm_scratch0); |
3055 __ cvtlsi2sd(xmm_scratch1, scratch); | 3055 __ cvtlsi2sd(xmm_scratch1, scratch); |
3056 __ ucomisd(xmm_scratch1, xmm_scratch0); | 3056 __ ucomisd(xmm_scratch1, xmm_scratch0); |
3057 __ j(not_equal, fail); | 3057 __ j(not_equal, fail); |
3058 __ j(parity_even, fail); // NaN. | 3058 __ j(parity_even, fail); // NaN. |
| 3059 #if V8_USE_31_BITS_SMI_VALUE |
| 3060 __ cmpl(scratch, Immediate(0xc0000000)); |
| 3061 __ j(sign, fail); |
| 3062 #endif |
3059 __ Integer32ToSmi(key, scratch); | 3063 __ Integer32ToSmi(key, scratch); |
3060 __ bind(&key_ok); | 3064 __ bind(&key_ok); |
3061 } | 3065 } |
3062 | 3066 |
3063 | 3067 |
3064 void KeyedStoreStubCompiler::GenerateStoreExternalArray( | 3068 void KeyedStoreStubCompiler::GenerateStoreExternalArray( |
3065 MacroAssembler* masm, | 3069 MacroAssembler* masm, |
3066 ElementsKind elements_kind) { | 3070 ElementsKind elements_kind) { |
3067 // ----------- S t a t e ------------- | 3071 // ----------- S t a t e ------------- |
3068 // -- rax : value | 3072 // -- rax : value |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3512 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3516 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
3513 } | 3517 } |
3514 } | 3518 } |
3515 | 3519 |
3516 | 3520 |
3517 #undef __ | 3521 #undef __ |
3518 | 3522 |
3519 } } // namespace v8::internal | 3523 } } // namespace v8::internal |
3520 | 3524 |
3521 #endif // V8_TARGET_ARCH_X64 | 3525 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |