All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.0] tcg/i386: Fix %r12 guest_base initialization
@ 2020-04-06 17:48 Richard Henderson
  2020-04-06 18:13 ` Alex Bennée
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2020-04-06 17:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee

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>
---
 tcg/i386/tcg-target.inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
index 7f61eeedd0..ec083bddcf 100644
--- a/tcg/i386/tcg-target.inc.c
+++ b/tcg/i386/tcg-target.inc.c
@@ -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);
         }
     }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-5.0] tcg/i386: Fix %r12 guest_base initialization
  2020-04-06 17:48 [PATCH for-5.0] tcg/i386: Fix %r12 guest_base initialization Richard Henderson
@ 2020-04-06 18:13 ` Alex Bennée
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2020-04-06 18:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> 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>

> ---
>  tcg/i386/tcg-target.inc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
> index 7f61eeedd0..ec083bddcf 100644
> --- a/tcg/i386/tcg-target.inc.c
> +++ b/tcg/i386/tcg-target.inc.c
> @@ -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);
>          }
>      }


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-06 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 17:48 [PATCH for-5.0] tcg/i386: Fix %r12 guest_base initialization Richard Henderson
2020-04-06 18:13 ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.