Skip to content

Commit cce743a

Browse files
rth7680stsquad
authored andcommitted
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 <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Tested-by: Alex Bennée <[email protected]> Message-Id: <[email protected]> Signed-off-by: Alex Bennée <[email protected]>
1 parent eca7a8e commit cce743a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcg/i386/tcg-target.inc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3737,7 +3737,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
37373737
} else {
37383738
/* Choose R12 because, as a base, it requires a SIB byte. */
37393739
x86_guest_base_index = TCG_REG_R12;
3740-
tcg_out_mov(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base);
3740+
tcg_out_movi(s, TCG_TYPE_PTR, x86_guest_base_index, guest_base);
37413741
tcg_regset_set_reg(s->reserved_regs, x86_guest_base_index);
37423742
}
37433743
}

0 commit comments

Comments
 (0)