WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

Commit 381c4589 authored by qinsoon's avatar qinsoon
Browse files

fix bug: in normal_cont block, branch is inserted after postcall

sequence
parent 112a1545
......@@ -2614,20 +2614,23 @@ impl <'a> InstructionSelection {
}
// insert an intermediate block to branch to normal
// the branch is inserted later (because we need to deal with postcall convention)
self.finish_block();
let fv_id = self.current_fv_id;
self.start_block(format!("normal_cont_for_call_{}_{}", fv_id, cur_node.id()));
}
// deal with ret vals, collapse stack etc.
self.emit_postcall_convention(
&func_sig, &inst.value,
stack_arg_size, f_context, vm);
if resumption.is_some() {
let ref normal_dest = resumption.as_ref().unwrap().normal_dest;
let normal_target_name = f_content.get_block(normal_dest.target).name().unwrap();
self.backend.emit_jmp(normal_target_name);
}
// deal with ret vals
self.emit_postcall_convention(
&func_sig, &inst.value,
stack_arg_size, f_context, vm);
}
#[allow(unused_variables)]
......
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