[PATCH v3 08/13] target/openrisc: Conceal MO_TE within do_load()

Philippe Mathieu-Daudé posted 13 patches 1 month ago
Maintainers: Stafford Horne <shorne@gmail.com>
[PATCH v3 08/13] target/openrisc: Conceal MO_TE within do_load()
Posted by Philippe Mathieu-Daudé 1 month ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/openrisc/translate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index 52d51313f77..fe9128ea2fd 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -633,6 +633,7 @@ static void do_load(DisasContext *dc, arg_load *a, MemOp mop)
     TCGv ea;
 
     check_r0_write(dc, a->d);
+    mop |= MO_TE;
     ea = tcg_temp_new();
     tcg_gen_addi_tl(ea, cpu_R(dc, a->a), a->i);
     tcg_gen_qemu_ld_tl(cpu_R(dc, a->d), ea, dc->mem_idx, mop);
@@ -640,13 +641,13 @@ static void do_load(DisasContext *dc, arg_load *a, MemOp mop)
 
 static bool trans_l_lwz(DisasContext *dc, arg_load *a)
 {
-    do_load(dc, a, MO_TE | MO_UL);
+    do_load(dc, a, MO_UL);
     return true;
 }
 
 static bool trans_l_lws(DisasContext *dc, arg_load *a)
 {
-    do_load(dc, a, MO_TE | MO_SL);
+    do_load(dc, a, MO_SL);
     return true;
 }
 
@@ -664,13 +665,13 @@ static bool trans_l_lbs(DisasContext *dc, arg_load *a)
 
 static bool trans_l_lhz(DisasContext *dc, arg_load *a)
 {
-    do_load(dc, a, MO_TE | MO_UW);
+    do_load(dc, a, MO_UW);
     return true;
 }
 
 static bool trans_l_lhs(DisasContext *dc, arg_load *a)
 {
-    do_load(dc, a, MO_TE | MO_SW);
+    do_load(dc, a, MO_SW);
     return true;
 }
 
-- 
2.51.0


Re: [PATCH v3 08/13] target/openrisc: Conceal MO_TE within do_load()
Posted by Richard Henderson 1 month ago
On 10/10/25 00:06, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/openrisc/translate.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~