Skip to content
  • Cyril SIX's avatar
    Fixing get_loop_info : part 2 · 569084f1
    Cyril SIX authored
    Loops with multiple CBs were only partially predicted for some cases
    (the header CB would get predicted, but not the CBs inside)
    
    This would happen in the case of breaks leading to another loop, such
    as:
    
    ```c
    void lift_check_level()
    {
      int i;
      int middle = lift_one_level >> 2;
      if ( lift_cntValid ) {
    
        for ( lift_level = 1; lift_level < 14; ++lift_level ) {
          if ( lift_cnt < lift_levelPos[lift_level] - middle )
            break; /* This break */
        }
      } else
        lift_level = 0;
    
      for ( i = 0; i < 14; ++i )
        lift_ctrl_io_led[i] = ( i == lift_level - 1 );
    }
    ```
    569084f1