Skip to content

Commit

Permalink
Fix singlepass miscompilation on Operator::CallIndirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
losfair committed Feb 6, 2020
1 parent 2c44b70 commit ee9ddb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/singlepass-backend/src/codegen_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ee9ddb1

Please sign in to comment.