mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
accel/tcg: Introduce tb_pc and log_pc
The availability of tb->pc will shortly be conditional. Introduce accessor functions to minimize ifdefs. Pass around a known pc to places like tcg_gen_code, where the caller must already have the value. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -570,6 +570,12 @@ struct TranslationBlock {
|
||||
uintptr_t jmp_dest[2];
|
||||
};
|
||||
|
||||
/* Hide the read to avoid ifdefs for TARGET_TB_PCREL. */
|
||||
static inline target_ulong tb_pc(const TranslationBlock *tb)
|
||||
{
|
||||
return tb->pc;
|
||||
}
|
||||
|
||||
/* Hide the qatomic_read to make code a little easier on the eyes */
|
||||
static inline uint32_t tb_cflags(const TranslationBlock *tb)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user