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

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

Issue 1339293002: X87: Make FlushICache part of Assembler(Base) and take Isolate as parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/x87/code-stubs-x87.h ('k') | src/x87/macro-assembler-x87.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/x87/codegen-x87.h" 5 #include "src/x87/codegen-x87.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 __ mov_b(Operand(dst, 0), eax); 175 __ mov_b(Operand(dst, 0), eax);
176 __ jmp(&backward_loop_1byte); 176 __ jmp(&backward_loop_1byte);
177 } 177 }
178 178
179 __ bind(&pop_and_return); 179 __ bind(&pop_and_return);
180 MemMoveEmitPopAndReturn(&masm); 180 MemMoveEmitPopAndReturn(&masm);
181 181
182 CodeDesc desc; 182 CodeDesc desc;
183 masm.GetCode(&desc); 183 masm.GetCode(&desc);
184 DCHECK(!RelocInfo::RequiresRelocation(desc)); 184 DCHECK(!RelocInfo::RequiresRelocation(desc));
185 CpuFeatures::FlushICache(buffer, actual_size); 185 Assembler::FlushICacheWithoutIsolate(buffer, actual_size);
186 base::OS::ProtectCode(buffer, actual_size); 186 base::OS::ProtectCode(buffer, actual_size);
187 // TODO(jkummerow): It would be nice to register this code creation event 187 // TODO(jkummerow): It would be nice to register this code creation event
188 // with the PROFILE / GDBJIT system. 188 // with the PROFILE / GDBJIT system.
189 return FUNCTION_CAST<MemMoveFunction>(buffer); 189 return FUNCTION_CAST<MemMoveFunction>(buffer);
190 } 190 }
191 191
192 192
193 #undef __ 193 #undef __
194 194
195 // ------------------------------------------------------------------------- 195 // -------------------------------------------------------------------------
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 611
612 612
613 void Code::PatchPlatformCodeAge(Isolate* isolate, 613 void Code::PatchPlatformCodeAge(Isolate* isolate,
614 byte* sequence, 614 byte* sequence,
615 Code::Age age, 615 Code::Age age,
616 MarkingParity parity) { 616 MarkingParity parity) {
617 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); 617 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length();
618 if (age == kNoAgeCodeAge) { 618 if (age == kNoAgeCodeAge) {
619 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); 619 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence);
620 CpuFeatures::FlushICache(sequence, young_length); 620 Assembler::FlushICache(isolate, sequence, young_length);
621 } else { 621 } else {
622 Code* stub = GetCodeAgeStub(isolate, age, parity); 622 Code* stub = GetCodeAgeStub(isolate, age, parity);
623 CodePatcher patcher(sequence, young_length); 623 CodePatcher patcher(sequence, young_length);
624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
625 } 625 }
626 } 626 }
627 627
628 628
629 } // namespace internal 629 } // namespace internal
630 } // namespace v8 630 } // namespace v8
631 631
632 #endif // V8_TARGET_ARCH_X87 632 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.h ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698