| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } else if (FLAG_track_fields && representation.IsSmi()) { | 831 } else if (FLAG_track_fields && representation.IsSmi()) { |
| 832 __ JumpIfNotSmi(value_reg, miss_label); | 832 __ JumpIfNotSmi(value_reg, miss_label); |
| 833 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 833 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 834 __ JumpIfSmi(value_reg, miss_label); | 834 __ JumpIfSmi(value_reg, miss_label); |
| 835 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 835 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 836 Label do_store, heap_number; | 836 Label do_store, heap_number; |
| 837 __ AllocateHeapNumber(storage_reg, scratch1, slow); | 837 __ AllocateHeapNumber(storage_reg, scratch1, slow); |
| 838 | 838 |
| 839 __ JumpIfNotSmi(value_reg, &heap_number); | 839 __ JumpIfNotSmi(value_reg, &heap_number); |
| 840 __ SmiToInteger32(scratch1, value_reg); | 840 __ SmiToInteger32(scratch1, value_reg); |
| 841 __ cvtlsi2sd(xmm0, scratch1); | 841 __ Cvtlsi2sd(xmm0, scratch1); |
| 842 __ jmp(&do_store); | 842 __ jmp(&do_store); |
| 843 | 843 |
| 844 __ bind(&heap_number); | 844 __ bind(&heap_number); |
| 845 __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), | 845 __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
| 846 miss_label, DONT_DO_SMI_CHECK); | 846 miss_label, DONT_DO_SMI_CHECK); |
| 847 __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); | 847 __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
| 848 | 848 |
| 849 __ bind(&do_store); | 849 __ bind(&do_store); |
| 850 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); | 850 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); |
| 851 } | 851 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 __ movq(scratch1, | 985 __ movq(scratch1, |
| 986 FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 986 FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 987 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 987 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 988 __ movq(scratch1, FieldOperand(scratch1, offset)); | 988 __ movq(scratch1, FieldOperand(scratch1, offset)); |
| 989 } | 989 } |
| 990 | 990 |
| 991 // Store the value into the storage. | 991 // Store the value into the storage. |
| 992 Label do_store, heap_number; | 992 Label do_store, heap_number; |
| 993 __ JumpIfNotSmi(value_reg, &heap_number); | 993 __ JumpIfNotSmi(value_reg, &heap_number); |
| 994 __ SmiToInteger32(scratch2, value_reg); | 994 __ SmiToInteger32(scratch2, value_reg); |
| 995 __ cvtlsi2sd(xmm0, scratch2); | 995 __ Cvtlsi2sd(xmm0, scratch2); |
| 996 __ jmp(&do_store); | 996 __ jmp(&do_store); |
| 997 | 997 |
| 998 __ bind(&heap_number); | 998 __ bind(&heap_number); |
| 999 __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), | 999 __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
| 1000 miss_label, DONT_DO_SMI_CHECK); | 1000 miss_label, DONT_DO_SMI_CHECK); |
| 1001 __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); | 1001 __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
| 1002 __ bind(&do_store); | 1002 __ bind(&do_store); |
| 1003 __ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); | 1003 __ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); |
| 1004 // Return the value (register rax). | 1004 // Return the value (register rax). |
| 1005 ASSERT(value_reg.is(rax)); | 1005 ASSERT(value_reg.is(rax)); |
| (...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 // ----------------------------------- | 3150 // ----------------------------------- |
| 3151 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3151 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3152 } | 3152 } |
| 3153 | 3153 |
| 3154 | 3154 |
| 3155 #undef __ | 3155 #undef __ |
| 3156 | 3156 |
| 3157 } } // namespace v8::internal | 3157 } } // namespace v8::internal |
| 3158 | 3158 |
| 3159 #endif // V8_TARGET_ARCH_X64 | 3159 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |