Binds the exit label of the control stack frame.
(&self, masm: &mut M)
| 595 | |
| 596 | /// Binds the exit label of the control stack frame. |
| 597 | pub fn bind_exit_label<M: MacroAssembler>(&self, masm: &mut M) -> Result<()> { |
| 598 | use ControlStackFrame::*; |
| 599 | match self { |
| 600 | // We use an explicit label to track the exit of an if block. In case there's no |
| 601 | // else, we bind the if's continuation block to make sure that any jumps from the if |
| 602 | // condition are reachable and we bind the explicit exit label as well to ensure that any |
| 603 | // branching instructions are able to correctly reach the block's end. |
| 604 | If { cont, .. } => masm.bind(*cont)?, |
| 605 | _ => {} |
| 606 | } |
| 607 | if let Some(label) = self.exit_label() { |
| 608 | masm.bind(*label)?; |
| 609 | } |
| 610 | Ok(()) |
| 611 | } |
| 612 | |
| 613 | /// Returns the continuation label of the current control stack frame. |
| 614 | pub fn label(&self) -> &MachLabel { |
no test coverage detected