fn conditional_graph(address: u64, branching_condition: Expression) -> Result<ControlFlowGraph> {
    let mut cfg = ControlFlowGraph::new();

    let block_index = {
        let block = cfg.new_block()?;
        block.assign(scalar("branching_condition", 1), branching_condition);
        block.index()
    };

    cfg.set_entry(block_index)?;
    cfg.set_exit(block_index)?;

    cfg.set_address(Some(address));

    Ok(cfg)
}
// If a branch has a delay slot, we need to calculate the condition for the
// branch before we execute the delay slow. We create a graph which sets a
// scalar "branching" condition, and execute this prior to the delay slot.
If a branch has a delay slot, we need to calculate the condition for the
branch before we execute the delay slow. We create a graph which sets a
scalar "branching" condition, and execute this prior to the delay slot.
If a branch has a delay slot we need to calculate the condition for the branch before we execute the delay slow . We create a graph which sets a scalar " branching " condition and execute this prior to the delay slot .
fn conditional_graph(address: u64, branching_condition: Expression) -> Result<ControlFlowGraph> {
    let mut cfg = ControlFlowGraph::new();
    let block_index = {
        let block = cfg.new_block()?;
        block.assign(scalar("branching_condition", 1), branching_condition);
        block.index()
    };
    cfg.set_entry(block_index)?;
    cfg.set_exit(block_index)?;
    cfg.set_address(Some(address));
    Ok(cfg)
}
fn conditional_graph ( address : u64 , branching_condition : Expression ) -> Result < ControlFlowGraph > { let mut cfg = ControlFlowGraph :: new ( ) ; let block_index = { let block = cfg . new_block ( ) ? ; block . assign ( scalar ( " " , 1 ) , branching_condition ) ; block . index ( ) } ; cfg . set_entry ( block_index ) ? ; cfg . set_exit ( block_index ) ? ; cfg . set_address ( Some ( address ) ) ; Ok ( cfg ) }
If a branch has a delay slot, we need to calculate the condition for the
branch before we execute the delay slow.
If a branch has a delay slot we need to calculate the condition for the branch before we execute the delay slow .
address
u64
branching_condition
Expression
address
u64
branching_condition
Expression