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

Unified Diff: src/assembler.h

Issue 2021323003: [wasm] remove faux code objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/assembler-arm64-inl.h ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 3670d7fa5c5ca24026b22a235b02b2e7acb7243a..fc4721072f1195f70ce318b861a55b40eccb5abc 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -421,7 +421,8 @@ class RelocInfo {
// This is not an actual reloc mode, but used to encode a long pc jump that
// cannot be encoded as part of another record.
PC_JUMP,
-
+ WASM_DIRECT_CALL,
+ WASM_IMPORT_CALL,
// Pseudo-types
NUMBER_OF_MODES,
NONE32, // never recorded 32-bit value
@@ -529,6 +530,9 @@ class RelocInfo {
static inline bool IsWasmMemorySizeReference(Mode mode) {
return mode == WASM_MEMORY_SIZE_REFERENCE;
}
+ static inline bool IsWasmCall(Mode mode) {
+ return mode == WASM_DIRECT_CALL || mode == WASM_IMPORT_CALL;
+ }
static inline int ModeMask(Mode mode) { return 1 << mode; }
// Accessors
@@ -557,6 +561,8 @@ class RelocInfo {
Address wasm_memory_reference();
uint32_t wasm_memory_size_reference();
+ uint32_t wasm_function_index();
+
void update_wasm_memory_reference(
Address old_base, Address new_base, uint32_t old_size, uint32_t new_size,
ICacheFlushMode icache_flush_mode = SKIP_ICACHE_FLUSH);
@@ -665,6 +671,8 @@ class RelocInfo {
#endif
static const int kCodeTargetMask = (1 << (LAST_CODE_ENUM + 1)) - 1;
+ static const int kWasmDirectCallMask = 1 << WASM_DIRECT_CALL;
+ static const int kWasmImportCallMask = 1 << WASM_IMPORT_CALL;
static const int kPositionMask = 1 << POSITION | 1 << STATEMENT_POSITION;
static const int kDataMask =
(1 << CODE_TARGET_WITH_ID) | kPositionMask | (1 << COMMENT);
@@ -731,6 +739,10 @@ class RelocInfoWriter BASE_EMBEDDED {
// Here we use the maximum of the two.
static const int kMaxSize = 15;
+ // Update the mode. This should be used carefully, the new mode should have
+ // the same schema as the old one.
+ void WriteModeNoAdvance(RelocInfo::Mode rmode);
+
private:
inline uint32_t WriteLongPCJump(uint32_t pc_delta);
@@ -785,6 +797,8 @@ class RelocIterator: public Malloced {
return &rinfo_;
}
+ byte* mode_pos() const { return mode_pos_; }
+
private:
// Advance* moves the position before/after reading.
// *Read* reads from current byte(s) into rinfo_.
@@ -814,6 +828,7 @@ class RelocIterator: public Malloced {
}
byte* pos_;
+ byte* mode_pos_;
byte* end_;
byte* code_age_sequence_;
RelocInfo rinfo_;
« no previous file with comments | « src/arm64/assembler-arm64-inl.h ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698