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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 6778018: Only pass isolate parameter to C helper functions that need it. (Closed)
Patch Set: Created 9 years, 8 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/deoptimizer.cc ('k') | src/ia32/deoptimizer-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 7430 matching lines...) Expand 10 before | Expand all | Expand 10 after
7441 __ AllocateHeapNumber(edi, ebx, ecx, &slow_allocate_heapnumber); 7441 __ AllocateHeapNumber(edi, ebx, ecx, &slow_allocate_heapnumber);
7442 __ jmp(&heapnumber_allocated); 7442 __ jmp(&heapnumber_allocated);
7443 7443
7444 __ bind(&slow_allocate_heapnumber); 7444 __ bind(&slow_allocate_heapnumber);
7445 // Allocate a heap number. 7445 // Allocate a heap number.
7446 __ CallRuntime(Runtime::kNumberAlloc, 0); 7446 __ CallRuntime(Runtime::kNumberAlloc, 0);
7447 __ mov(edi, eax); 7447 __ mov(edi, eax);
7448 7448
7449 __ bind(&heapnumber_allocated); 7449 __ bind(&heapnumber_allocated);
7450 7450
7451 __ PrepareCallCFunction(0, ebx); 7451 __ PrepareCallCFunction(1, ebx);
7452 __ mov(Operand(esp, 0), Immediate(ExternalReference::isolate_address()));
7452 __ CallCFunction(ExternalReference::random_uint32_function(masm()->isolate()), 7453 __ CallCFunction(ExternalReference::random_uint32_function(masm()->isolate()),
7453 0); 7454 1);
7454 7455
7455 // Convert 32 random bits in eax to 0.(32 random bits) in a double 7456 // Convert 32 random bits in eax to 0.(32 random bits) in a double
7456 // by computing: 7457 // by computing:
7457 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). 7458 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
7458 // This is implemented on both SSE2 and FPU. 7459 // This is implemented on both SSE2 and FPU.
7459 if (masm()->isolate()->cpu_features()->IsSupported(SSE2)) { 7460 if (masm()->isolate()->cpu_features()->IsSupported(SSE2)) {
7460 CpuFeatures::Scope fscope(SSE2); 7461 CpuFeatures::Scope fscope(SSE2);
7461 __ mov(ebx, Immediate(0x49800000)); // 1.0 x 2^20 as single. 7462 __ mov(ebx, Immediate(0x49800000)); // 1.0 x 2^20 as single.
7462 __ movd(xmm1, Operand(ebx)); 7463 __ movd(xmm1, Operand(ebx));
7463 __ movd(xmm0, Operand(eax)); 7464 __ movd(xmm0, Operand(eax));
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
10378 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 10379 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
10379 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 10380 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
10380 return FUNCTION_CAST<OS::MemCopyFunction>(chunk->GetStartAddress()); 10381 return FUNCTION_CAST<OS::MemCopyFunction>(chunk->GetStartAddress());
10381 } 10382 }
10382 10383
10383 #undef __ 10384 #undef __
10384 10385
10385 } } // namespace v8::internal 10386 } } // namespace v8::internal
10386 10387
10387 #endif // V8_TARGET_ARCH_IA32 10388 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698