Index: src/ia32/assembler-ia32.cc |
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc |
index 01b366431b2753a2a8104aea1eb56815b43c4574..40a35157fa23336d73530bd23e86712757a170f5 100644 |
--- a/src/ia32/assembler-ia32.cc |
+++ b/src/ia32/assembler-ia32.cc |
@@ -196,6 +196,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) { |
@@ -1603,6 +1608,15 @@ void Assembler::call(Handle<Code> code, |
emit(code, 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); |
+ |
+ emit(index); |
+} |
void Assembler::jmp(Label* L, Label::Distance distance) { |
EnsureSpace ensure_space(this); |