mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
tcg/i386: Fix %r12 guest_base initialization
When %gs cannot be used, we use register offset addressing. This path is almost never used, so it was clearly not tested. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200406174803.8192-1-richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
parent
eca7a8e6c0
commit
cce743abbf
1 changed files with 1 additions and 1 deletions
|
@ -3737,7 +3737,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
|||
} else {
|
||||
/* Choose R12 because, as a base, it requires a SIB byte. */
|
||||
x86_guest_base_index = TCG_REG_R12;
|
||||
tcg_out_mov(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base);
|
||||
tcg_out_movi(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base);
|
||||
tcg_regset_set_reg(s->reserved_regs, x86_guest_base_index);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue