Commit f5631ead authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [wasm] Prerequisites for WebAssembly Table.Grow.

  port 0c4b8ff4 (r42192)

  original commit message:
   - Refactor Dispatch tables to have separate function, signature tables
   - New Relocation type for WasmFunctionTableReference, assembler, compiler support.
   - RelocInfo helper functions for Wasm references

BUG=

Review-Url: https://codereview.chromium.org/2623133002
Cr-Commit-Position: refs/heads/master@{#42208}
parent b8a95b35
......@@ -60,9 +60,7 @@ class X87OperandConverter : public InstructionOperandConverter {
Immediate ToImmediate(InstructionOperand* operand) {
Constant constant = ToConstant(operand);
if (constant.type() == Constant::kInt32 &&
(constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE ||
constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) {
RelocInfo::IsWasmReference(constant.rmode())) {
return Immediate(reinterpret_cast<Address>(constant.ToInt32()),
constant.rmode());
}
......
......@@ -116,13 +116,18 @@ uint32_t RelocInfo::wasm_memory_size_reference() {
return Memory::uint32_at(pc_);
}
uint32_t RelocInfo::wasm_function_table_size_reference() {
DCHECK(IsWasmFunctionTableSizeReference(rmode_));
return Memory::uint32_at(pc_);
}
void RelocInfo::unchecked_update_wasm_memory_reference(
Address address, ICacheFlushMode flush_mode) {
Memory::Address_at(pc_) = address;
}
void RelocInfo::unchecked_update_wasm_memory_size(uint32_t size,
ICacheFlushMode flush_mode) {
void RelocInfo::unchecked_update_wasm_size(uint32_t size,
ICacheFlushMode flush_mode) {
Memory::uint32_at(pc_) = size;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment