Skip to content
Snippets Groups Projects
Commit cce743ab authored by Richard Henderson's avatar Richard Henderson Committed by Alex Bennée
Browse files

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: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Tested-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Message-Id: <20200406174803.8192-1-richard.henderson@linaro.org>
Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
parent eca7a8e6
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment