All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcg/tci: Use tcg_out_ldst in tcg_out_st
@ 2022-02-26  1:55 Richard Henderson
  2022-02-27 22:53 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2022-02-26  1:55 UTC (permalink / raw)
  To: qemu-devel

The tcg_out_ldst helper will handle out-of-range offsets.
We haven't actually encountered any, since we haven't run
across the assert within tcg_out_op_rrs, but an out-of-range
offset would not be impossible in future.

Fixes: 65089889183 ("tcg/tci: Change encoding to uint32_t units")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tci/tcg-target.c.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index 0cb16aaa81..9ff1fa0832 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -790,14 +790,13 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
 static void tcg_out_st(TCGContext *s, TCGType type, TCGReg val, TCGReg base,
                        intptr_t offset)
 {
-    stack_bounds_check(base, offset);
     switch (type) {
     case TCG_TYPE_I32:
-        tcg_out_op_rrs(s, INDEX_op_st_i32, val, base, offset);
+        tcg_out_ldst(s, INDEX_op_st_i32, val, base, offset);
         break;
 #if TCG_TARGET_REG_BITS == 64
     case TCG_TYPE_I64:
-        tcg_out_op_rrs(s, INDEX_op_st_i64, val, base, offset);
+        tcg_out_ldst(s, INDEX_op_st_i64, val, base, offset);
         break;
 #endif
     default:
-- 
2.25.1



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

* Re: [PATCH] tcg/tci: Use tcg_out_ldst in tcg_out_st
  2022-02-26  1:55 [PATCH] tcg/tci: Use tcg_out_ldst in tcg_out_st Richard Henderson
@ 2022-02-27 22:53 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-02-27 22:53 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 26/2/22 02:55, Richard Henderson wrote:
> The tcg_out_ldst helper will handle out-of-range offsets.
> We haven't actually encountered any, since we haven't run
> across the assert within tcg_out_op_rrs, but an out-of-range
> offset would not be impossible in future.
> 
> Fixes: 65089889183 ("tcg/tci: Change encoding to uint32_t units")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/tci/tcg-target.c.inc | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

end of thread, other threads:[~2022-02-27 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26  1:55 [PATCH] tcg/tci: Use tcg_out_ldst in tcg_out_st Richard Henderson
2022-02-27 22:53 ` Philippe Mathieu-Daudé

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.