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

Unified Diff: src/assembler.cc

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/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 553e37da40e125c0c22f4d7de5eac3aacf44e5d4..67f30f20a09e7bf777474ada4ac56cea59bb23a1 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -415,6 +415,10 @@ void RelocInfoWriter::WriteMode(RelocInfo::Mode rmode) {
*--pos_ = static_cast<int>((rmode << kTagBits) | kDefaultTag);
}
+void RelocInfoWriter::WriteModeNoAdvance(RelocInfo::Mode rmode) {
+ STATIC_ASSERT(RelocInfo::NUMBER_OF_MODES <= (1 << kLongTagBits));
+ *pos_ = static_cast<int>((rmode << kTagBits) | kDefaultTag);
+}
void RelocInfoWriter::WriteModeAndPC(uint32_t pc_delta, RelocInfo::Mode rmode) {
// Write two-byte tagged pc-delta, possibly preceded by var. length pc-jump.
@@ -548,6 +552,7 @@ inline int RelocIterator::AdvanceGetTag() {
inline RelocInfo::Mode RelocIterator::GetMode() {
+ mode_pos_ = pos_;
return static_cast<RelocInfo::Mode>((*pos_ >> kTagBits) &
((1 << kLongTagBits) - 1));
}
@@ -754,6 +759,7 @@ RelocIterator::RelocIterator(Code* code, int mode_mask)
rinfo_.data_ = 0;
// Relocation info is read backwards.
pos_ = code->relocation_start() + code->relocation_size();
+ mode_pos_ = nullptr;
end_ = code->relocation_start();
done_ = false;
mode_mask_ = mode_mask;
@@ -779,6 +785,7 @@ RelocIterator::RelocIterator(const CodeDesc& desc, int mode_mask)
rinfo_.data_ = 0;
// Relocation info is read backwards.
pos_ = desc.buffer + desc.buffer_size;
+ mode_pos_ = nullptr;
end_ = pos_ - desc.reloc_size;
done_ = false;
mode_mask_ = mode_mask;
@@ -867,6 +874,10 @@ const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) {
return "wasm memory reference";
case WASM_MEMORY_SIZE_REFERENCE:
return "wasm memory size reference";
+ case WASM_DIRECT_CALL:
+ return "wasm direct call";
+ case WASM_IMPORT_CALL:
+ return "wasm import call";
case NUMBER_OF_MODES:
case PC_JUMP:
UNREACHABLE();
@@ -966,6 +977,8 @@ void RelocInfo::Verify(Isolate* isolate) {
case WASM_MEMORY_SIZE_REFERENCE:
case NONE32:
case NONE64:
+ case WASM_DIRECT_CALL:
+ case WASM_IMPORT_CALL:
break;
case NUMBER_OF_MODES:
case PC_JUMP:
« no previous file with comments | « src/assembler.h ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698