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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 XMMRegister temp, 384 XMMRegister temp,
385 MinusZeroMode minus_zero_mode, 385 MinusZeroMode minus_zero_mode,
386 Label* lost_precision) { 386 Label* lost_precision) {
387 Label done; 387 Label done;
388 ASSERT(!temp.is(xmm0)); 388 ASSERT(!temp.is(xmm0));
389 389
390 cmp(FieldOperand(input_reg, HeapObject::kMapOffset), 390 cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
391 isolate()->factory()->heap_number_map()); 391 isolate()->factory()->heap_number_map());
392 j(not_equal, lost_precision, Label::kNear); 392 j(not_equal, lost_precision, Label::kNear);
393 393
394 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 394 if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
395 ASSERT(!temp.is(no_xmm_reg)); 395 ASSERT(!temp.is(no_xmm_reg));
396 CpuFeatureScope scope(this, SSE2); 396 CpuFeatureScope scope(this, SSE2);
397 397
398 movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset)); 398 movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
399 cvttsd2si(result_reg, Operand(xmm0)); 399 cvttsd2si(result_reg, Operand(xmm0));
400 Cvtsi2sd(temp, Operand(result_reg)); 400 Cvtsi2sd(temp, Operand(result_reg));
401 ucomisd(xmm0, temp); 401 ucomisd(xmm0, temp);
402 RecordComment("Deferred TaggedToI: lost precision"); 402 RecordComment("Deferred TaggedToI: lost precision");
403 j(not_equal, lost_precision, Label::kNear); 403 j(not_equal, lost_precision, Label::kNear);
404 RecordComment("Deferred TaggedToI: NaN"); 404 RecordComment("Deferred TaggedToI: NaN");
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 } 1394 }
1395 1395
1396 1396
1397 // Compute the hash code from the untagged key. This must be kept in sync with 1397 // Compute the hash code from the untagged key. This must be kept in sync with
1398 // ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in 1398 // ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
1399 // code-stub-hydrogen.cc 1399 // code-stub-hydrogen.cc
1400 // 1400 //
1401 // Note: r0 will contain hash code 1401 // Note: r0 will contain hash code
1402 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { 1402 void MacroAssembler::GetNumberHash(Register r0, Register scratch) {
1403 // Xor original key with a seed. 1403 // Xor original key with a seed.
1404 if (Serializer::enabled()) { 1404 if (Serializer::enabled(isolate())) {
1405 ExternalReference roots_array_start = 1405 ExternalReference roots_array_start =
1406 ExternalReference::roots_array_start(isolate()); 1406 ExternalReference::roots_array_start(isolate());
1407 mov(scratch, Immediate(Heap::kHashSeedRootIndex)); 1407 mov(scratch, Immediate(Heap::kHashSeedRootIndex));
1408 mov(scratch, 1408 mov(scratch,
1409 Operand::StaticArray(scratch, times_pointer_size, roots_array_start)); 1409 Operand::StaticArray(scratch, times_pointer_size, roots_array_start));
1410 SmiUntag(scratch); 1410 SmiUntag(scratch);
1411 xor_(r0, scratch); 1411 xor_(r0, scratch);
1412 } else { 1412 } else {
1413 int32_t seed = isolate()->heap()->HashSeed(); 1413 int32_t seed = isolate()->heap()->HashSeed();
1414 xor_(r0, Immediate(seed)); 1414 xor_(r0, Immediate(seed));
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3623 if (ms.shift() > 0) sar(edx, ms.shift()); 3623 if (ms.shift() > 0) sar(edx, ms.shift());
3624 mov(eax, dividend); 3624 mov(eax, dividend);
3625 shr(eax, 31); 3625 shr(eax, 31);
3626 add(edx, eax); 3626 add(edx, eax);
3627 } 3627 }
3628 3628
3629 3629
3630 } } // namespace v8::internal 3630 } } // namespace v8::internal
3631 3631
3632 #endif // V8_TARGET_ARCH_IA32 3632 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698