Fix memory grow

This commit is contained in:
losfair 2019-09-18 02:38:35 +08:00
parent e40600533e
commit 72b6123def

View File

@ -4167,7 +4167,13 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
a, a,
&mut self.machine, &mut self.machine,
|a| { |a| {
a.emit_call_location(Location::GPR(GPR::RAX)); let label = a.get_label();
let after = a.get_label();
a.emit_jmp(Condition::None, after);
a.emit_label(label);
a.emit_homomorphic_host_redirection(GPR::RAX);
a.emit_label(after);
a.emit_call_label(label);
}, },
::std::iter::once(Location::Imm32(memory_index.index() as u32)) ::std::iter::once(Location::Imm32(memory_index.index() as u32))
.chain(::std::iter::once(param_pages)), .chain(::std::iter::once(param_pages)),