]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/i386: Fix %r12 guest_base initialization
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 6 Apr 2020 17:48:03 +0000 (10:48 -0700)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 7 Apr 2020 15:19:49 +0000 (16:19 +0100)
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>
tcg/i386/tcg-target.inc.c

index 7f61eeedd09ce4995c45aa48a181fdbe65540dc7..ec083bddcfb7737512e8f1095b7dfcac8178e07d 100644 (file)
@@ -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);
         }
     }