mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Fix bug in LLVM lowering of 'return' when the stack has a float on it.
This commit is contained in:
parent
85666fc522
commit
681219b06c
@ -1412,14 +1412,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
}
|
||||
}
|
||||
Operator::Return => {
|
||||
let frame = state.outermost_frame()?;
|
||||
let current_block = builder.get_insert_block().ok_or(BinaryReaderError {
|
||||
message: "not currently in a block",
|
||||
offset: -1isize as usize,
|
||||
})?;
|
||||
|
||||
builder.build_unconditional_branch(frame.br_dest());
|
||||
|
||||
let frame = state.outermost_frame()?;
|
||||
for phi in frame.phis().to_vec().iter() {
|
||||
let (arg, info) = state.pop1_extra()?;
|
||||
@ -1427,6 +1424,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
phi.add_incoming(&[(&arg, ¤t_block)]);
|
||||
}
|
||||
|
||||
let frame = state.outermost_frame()?;
|
||||
builder.build_unconditional_branch(frame.br_dest());
|
||||
|
||||
state.reachable = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user