Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index 48f9a9a18364157a77769d60dc2d9564155ec8fa..b2e2ff97bf214fe3a457f0347d1fa2592ded2365 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -127,6 +127,11 @@ uint32_t RelocInfo::wasm_memory_size_reference() { |
return Memory::uint32_at(pc_); |
} |
+uint32_t RelocInfo::wasm_function_index() { |
+ DCHECK(IsWasmCall(rmode_)); |
+ return Memory::uint32_at(pc_); |
+} |
+ |
void RelocInfo::update_wasm_memory_reference( |
Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
ICacheFlushMode icache_flush_mode) { |
@@ -888,6 +893,15 @@ void Assembler::call(Handle<Code> target, |
emit_code_target(target, rmode, ast_id); |
} |
+void Assembler::wasm_call(uint32_t index, RelocInfo::Mode rmode) { |
+ DCHECK(RelocInfo::IsWasmCall(rmode)); |
+ positions_recorder()->WriteRecordedPositions(); |
+ EnsureSpace ensure_space(this); |
+ emit(0xE8); |
+ RecordRelocInfo(rmode); |
+ |
+ emitl(index); |
+} |
void Assembler::call(Register adr) { |
positions_recorder()->WriteRecordedPositions(); |