]> git.proxmox.com Git - mirror_qemu.git/commit - tcg/tci.c
tcg: Clean up from 'next_tb'
authorSergey Fedorov <serge.fdrv@gmail.com>
Thu, 21 Apr 2016 12:58:23 +0000 (15:58 +0300)
committerRichard Henderson <rth@twiddle.net>
Fri, 13 May 2016 00:06:42 +0000 (14:06 -1000)
commit819af24b9c1e95e6576f1cefd32f4d6bf56dfa56
tree6088ddcf98e9610d4ac78ba8691b872d7cb762fc
parent7687bf52e5dc39215cde723bb2afb7c53b8bd842
tcg: Clean up from 'next_tb'

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: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
cpu-exec.c
tcg/tcg.h
tci.c
trace-events