Skip to content
  • Sergey Fedorov's avatar
    819af24b
    tcg: Clean up from 'next_tb' · 819af24b
    Sergey Fedorov authored
    
    
    The value returned from tcg_qemu_tb_exec() is the value passed to the
    corresponding tcg_gen_exit_tb() at translation time of the last TB
    attempted to execute. It is a little confusing to store it in a variable
    named 'next_tb'. In fact, it is a combination of 4-byte aligned pointer
    and additional information in its two least significant bits. Break it
    down right away into two variables named 'last_tb' and 'tb_exit' which
    are a pointer to the last TB attempted to execute and the TB exit
    reason, correspondingly. This simplifies the code and improves its
    readability.
    
    Correct a misleading documentation comment for tcg_qemu_tb_exec() and
    fix logging in cpu_tb_exec(). Also rename a misleading 'next_tb' in
    another couple of places.
    
    Signed-off-by: default avatarSergey Fedorov <serge.fdrv@gmail.com>
    Signed-off-by: default avatarSergey Fedorov <sergey.fedorov@linaro.org>
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
    819af24b
    tcg: Clean up from 'next_tb'
    Sergey Fedorov authored
    
    
    The value returned from tcg_qemu_tb_exec() is the value passed to the
    corresponding tcg_gen_exit_tb() at translation time of the last TB
    attempted to execute. It is a little confusing to store it in a variable
    named 'next_tb'. In fact, it is a combination of 4-byte aligned pointer
    and additional information in its two least significant bits. Break it
    down right away into two variables named 'last_tb' and 'tb_exit' which
    are a pointer to the last TB attempted to execute and the TB exit
    reason, correspondingly. This simplifies the code and improves its
    readability.
    
    Correct a misleading documentation comment for tcg_qemu_tb_exec() and
    fix logging in cpu_tb_exec(). Also rename a misleading 'next_tb' in
    another couple of places.
    
    Signed-off-by: default avatarSergey Fedorov <serge.fdrv@gmail.com>
    Signed-off-by: default avatarSergey Fedorov <sergey.fedorov@linaro.org>
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
Loading