Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 23654026: Use xorps to break the cvtsi2sd unnecessary dependence due to its partially written (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: rebase to master and address comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698