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

Side by Side Diff: src/arm64/assembler-arm64.h

Issue 1332283002: Make FlushICache part of Assembler(Base) and take Isolate as parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Try to fix cpu-arm once more 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_ASSEMBLER_ARM64_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // values, pc offset of entries which cannot be shared. 803 // values, pc offset of entries which cannot be shared.
804 std::vector<std::pair<uint64_t, int> > unique_entries_; 804 std::vector<std::pair<uint64_t, int> > unique_entries_;
805 }; 805 };
806 806
807 807
808 // ----------------------------------------------------------------------------- 808 // -----------------------------------------------------------------------------
809 // Assembler. 809 // Assembler.
810 810
811 class Assembler : public AssemblerBase { 811 class Assembler : public AssemblerBase {
812 public: 812 public:
813 using AssemblerBase::FlushICache;
814 using AssemblerBase::FlushICacheWithoutIsolate;
815
813 // Create an assembler. Instructions and relocation information are emitted 816 // Create an assembler. Instructions and relocation information are emitted
814 // into a buffer, with the instructions starting from the beginning and the 817 // into a buffer, with the instructions starting from the beginning and the
815 // relocation information starting from the end of the buffer. See CodeDesc 818 // relocation information starting from the end of the buffer. See CodeDesc
816 // for a detailed comment on the layout (globals.h). 819 // for a detailed comment on the layout (globals.h).
817 // 820 //
818 // If the provided buffer is NULL, the assembler allocates and grows its own 821 // If the provided buffer is NULL, the assembler allocates and grows its own
819 // buffer, and buffer_size determines the initial buffer size. The buffer is 822 // buffer, and buffer_size determines the initial buffer size. The buffer is
820 // owned by the assembler and deallocated upon destruction of the assembler. 823 // owned by the assembler and deallocated upon destruction of the assembler.
821 // 824 //
822 // If the provided buffer is not NULL, the assembler uses the provided buffer 825 // If the provided buffer is not NULL, the assembler uses the provided buffer
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 ~PatchingAssembler() { 2275 ~PatchingAssembler() {
2273 // Const pool should still be blocked. 2276 // Const pool should still be blocked.
2274 DCHECK(is_const_pool_blocked()); 2277 DCHECK(is_const_pool_blocked());
2275 EndBlockPools(); 2278 EndBlockPools();
2276 // Verify we have generated the number of instruction we expected. 2279 // Verify we have generated the number of instruction we expected.
2277 DCHECK((pc_offset() + kGap) == buffer_size_); 2280 DCHECK((pc_offset() + kGap) == buffer_size_);
2278 // Verify no relocation information has been emitted. 2281 // Verify no relocation information has been emitted.
2279 DCHECK(IsConstPoolEmpty()); 2282 DCHECK(IsConstPoolEmpty());
2280 // Flush the Instruction cache. 2283 // Flush the Instruction cache.
2281 size_t length = buffer_size_ - kGap; 2284 size_t length = buffer_size_ - kGap;
2282 CpuFeatures::FlushICache(buffer_, length); 2285 Assembler::FlushICacheWithoutIsolate(buffer_, length);
2283 } 2286 }
2284 2287
2285 // See definition of PatchAdrFar() for details. 2288 // See definition of PatchAdrFar() for details.
2286 static const int kAdrFarPatchableNNops = 2; 2289 static const int kAdrFarPatchableNNops = 2;
2287 static const int kAdrFarPatchableNInstrs = kAdrFarPatchableNNops + 2; 2290 static const int kAdrFarPatchableNInstrs = kAdrFarPatchableNNops + 2;
2288 void PatchAdrFar(int64_t target_offset); 2291 void PatchAdrFar(int64_t target_offset);
2289 }; 2292 };
2290 2293
2291 2294
2292 class EnsureSpace BASE_EMBEDDED { 2295 class EnsureSpace BASE_EMBEDDED {
2293 public: 2296 public:
2294 explicit EnsureSpace(Assembler* assembler) { 2297 explicit EnsureSpace(Assembler* assembler) {
2295 assembler->CheckBufferSpace(); 2298 assembler->CheckBufferSpace();
2296 } 2299 }
2297 }; 2300 };
2298 2301
2299 } } // namespace v8::internal 2302 } } // namespace v8::internal
2300 2303
2301 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ 2304 #endif // V8_ARM64_ASSEMBLER_ARM64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698