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

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

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 years, 9 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/ia32/assembler-ia32-inl.h ('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 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 "src/ia32/codegen-ia32.h" 5 #include "src/ia32/codegen-ia32.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 __ movsd(xmm0, Operand(esp, 1 * kPointerSize)); 49 __ movsd(xmm0, Operand(esp, 1 * kPointerSize));
50 __ sqrtsd(xmm0, xmm0); 50 __ sqrtsd(xmm0, xmm0);
51 __ movsd(Operand(esp, 1 * kPointerSize), xmm0); 51 __ movsd(Operand(esp, 1 * kPointerSize), xmm0);
52 // Load result into floating point register as return value. 52 // Load result into floating point register as return value.
53 __ fld_d(Operand(esp, 1 * kPointerSize)); 53 __ fld_d(Operand(esp, 1 * kPointerSize));
54 __ Ret(); 54 __ Ret();
55 } 55 }
56 56
57 CodeDesc desc; 57 CodeDesc desc;
58 masm.GetCode(&desc); 58 masm.GetCode(&desc);
59 DCHECK(!RelocInfo::RequiresRelocation(desc)); 59 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
60 60
61 Assembler::FlushICache(isolate, buffer, actual_size); 61 Assembler::FlushICache(isolate, buffer, actual_size);
62 base::OS::ProtectCode(buffer, actual_size); 62 base::OS::ProtectCode(buffer, actual_size);
63 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); 63 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer);
64 } 64 }
65 65
66 66
67 // Helper functions for CreateMemMoveFunction. 67 // Helper functions for CreateMemMoveFunction.
68 #undef __ 68 #undef __
69 #define __ ACCESS_MASM(masm) 69 #define __ ACCESS_MASM(masm)
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 } 462 }
463 __ mov(eax, Operand(count, times_4, conv.address(&small_handlers))); 463 __ mov(eax, Operand(count, times_4, conv.address(&small_handlers)));
464 __ jmp(eax); 464 __ jmp(eax);
465 } 465 }
466 466
467 __ bind(&pop_and_return); 467 __ bind(&pop_and_return);
468 MemMoveEmitPopAndReturn(&masm); 468 MemMoveEmitPopAndReturn(&masm);
469 469
470 CodeDesc desc; 470 CodeDesc desc;
471 masm.GetCode(&desc); 471 masm.GetCode(&desc);
472 DCHECK(!RelocInfo::RequiresRelocation(desc)); 472 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
473 Assembler::FlushICache(isolate, buffer, actual_size); 473 Assembler::FlushICache(isolate, buffer, actual_size);
474 base::OS::ProtectCode(buffer, actual_size); 474 base::OS::ProtectCode(buffer, actual_size);
475 // TODO(jkummerow): It would be nice to register this code creation event 475 // TODO(jkummerow): It would be nice to register this code creation event
476 // with the PROFILE / GDBJIT system. 476 // with the PROFILE / GDBJIT system.
477 return FUNCTION_CAST<MemMoveFunction>(buffer); 477 return FUNCTION_CAST<MemMoveFunction>(buffer);
478 } 478 }
479 479
480 480
481 #undef __ 481 #undef __
482 482
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 CodePatcher patcher(isolate, sequence, young_length); 644 CodePatcher patcher(isolate, sequence, young_length);
645 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 645 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
646 } 646 }
647 } 647 }
648 648
649 649
650 } // namespace internal 650 } // namespace internal
651 } // namespace v8 651 } // namespace v8
652 652
653 #endif // V8_TARGET_ARCH_IA32 653 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698