Fix singlepass miscompilation on Operator::CallIndirect.

This commit is contained in:
losfair 2020-02-06 23:10:55 +08:00
parent 2c44b700c8
commit ee9ddb18fc

View File

@ -6314,7 +6314,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
ExceptionCode::Memory,
|a| a.emit_conditional_trap(Condition::BelowEqual),
);
a.emit_mov(Size::S64, func_index, Location::GPR(table_count));
a.emit_mov(Size::S32, func_index, Location::GPR(table_count));
a.emit_imul_imm32_gpr64(vm::Anyfunc::size() as u32, table_count);
a.emit_add(
Size::S64,