From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Stafford Horne" <shorne@gmail.com>,
"Anton Johansson" <anjo@rev.ng>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v3 07/13] target/openrisc: Explode MO_TExx -> MO_TE | MO_xx
Date: Fri, 10 Oct 2025 09:06:55 +0200 [thread overview]
Message-ID: <20251010070702.51484-8-philmd@linaro.org> (raw)
In-Reply-To: <20251010070702.51484-1-philmd@linaro.org>
Extract the implicit MO_TE definition in order to replace
it in the next commit.
Mechanical change using:
$ for n in UW UL UQ UO SW SL SQ; do \
sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \
$(git grep -l MO_TE$n target/openrisc); \
done
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/openrisc/translate.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index 29e6b51a930..52d51313f77 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -622,7 +622,7 @@ static bool trans_l_lwa(DisasContext *dc, arg_load *a)
check_r0_write(dc, a->d);
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, MO_TEUL);
+ tcg_gen_qemu_ld_tl(cpu_R(dc, a->d), ea, dc->mem_idx, MO_TE | MO_UL);
tcg_gen_mov_tl(cpu_lock_addr, ea);
tcg_gen_mov_tl(cpu_lock_value, cpu_R(dc, a->d));
return true;
@@ -640,13 +640,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_TEUL);
+ do_load(dc, a, MO_TE | MO_UL);
return true;
}
static bool trans_l_lws(DisasContext *dc, arg_load *a)
{
- do_load(dc, a, MO_TESL);
+ do_load(dc, a, MO_TE | MO_SL);
return true;
}
@@ -664,13 +664,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_TEUW);
+ do_load(dc, a, MO_TE | MO_UW);
return true;
}
static bool trans_l_lhs(DisasContext *dc, arg_load *a)
{
- do_load(dc, a, MO_TESW);
+ do_load(dc, a, MO_TE | MO_SW);
return true;
}
@@ -688,7 +688,7 @@ static bool trans_l_swa(DisasContext *dc, arg_store *a)
val = tcg_temp_new();
tcg_gen_atomic_cmpxchg_tl(val, cpu_lock_addr, cpu_lock_value,
- cpu_R(dc, a->b), dc->mem_idx, MO_TEUL);
+ cpu_R(dc, a->b), dc->mem_idx, MO_TE | MO_UL);
tcg_gen_setcond_tl(TCG_COND_EQ, cpu_sr_f, val, cpu_lock_value);
tcg_gen_br(lab_done);
@@ -710,7 +710,7 @@ static void do_store(DisasContext *dc, arg_store *a, MemOp mop)
static bool trans_l_sw(DisasContext *dc, arg_store *a)
{
- do_store(dc, a, MO_TEUL);
+ do_store(dc, a, MO_TE | MO_UL);
return true;
}
@@ -722,7 +722,7 @@ static bool trans_l_sb(DisasContext *dc, arg_store *a)
static bool trans_l_sh(DisasContext *dc, arg_store *a)
{
- do_store(dc, a, MO_TEUW);
+ do_store(dc, a, MO_TE | MO_UW);
return true;
}
--
2.51.0
next prev parent reply other threads:[~2025-10-10 7:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 7:06 [PATCH v3 00/13] target/openrisc: Remove all uses of target_[u]long types Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 01/13] target/openrisc: Replace VMSTATE_UINTTL() -> VMSTATE_UINT32() Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 02/13] target/openrisc: Do not use target_ulong for @mr in MTSPR helper Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 03/13] target/openrisc: Remove unused cpu_openrisc_map_address_*() handlers Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 04/13] target/openrisc: Remove target_ulong use in raise_mmu_exception() Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 05/13] target/openrisc: Use vaddr type for $pc jumps Philippe Mathieu-Daudé
2025-10-10 7:06 ` [PATCH v3 06/13] target/openrisc: Remove 'TARGET_LONG_BITS != 32' dead code Philippe Mathieu-Daudé
2025-10-10 7:06 ` Philippe Mathieu-Daudé [this message]
2025-10-10 18:55 ` [PATCH v3 07/13] target/openrisc: Explode MO_TExx -> MO_TE | MO_xx Richard Henderson
2025-10-10 7:06 ` [PATCH v3 08/13] target/openrisc: Conceal MO_TE within do_load() Philippe Mathieu-Daudé
2025-10-10 18:56 ` Richard Henderson
2025-10-10 7:06 ` [PATCH v3 09/13] target/openrisc: Conceal MO_TE within do_store() Philippe Mathieu-Daudé
2025-10-10 18:56 ` Richard Henderson
2025-10-10 7:06 ` [PATCH v3 10/13] target/openrisc: Introduce mo_endian() helper Philippe Mathieu-Daudé
2025-10-10 18:56 ` Richard Henderson
2025-10-10 7:06 ` [PATCH v3 11/13] target/openrisc: Replace MO_TE -> MO_BE Philippe Mathieu-Daudé
2025-10-10 19:00 ` Richard Henderson
2025-10-10 7:07 ` [PATCH v3 12/13] target/openrisc: Inline tcg_gen_trunc_i64_tl() Philippe Mathieu-Daudé
2025-10-10 7:07 ` [PATCH v3 13/13] target/openrisc: Replace target_ulong -> uint32_t Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251010070702.51484-8-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=anjo@rev.ng \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shorne@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).