]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/sh4: Replace cpu_stl_data() call in OCBI helper
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 21 Nov 2025 09:02:20 +0000 (10:02 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 22 Jan 2026 09:42:19 +0000 (10:42 +0100)
In preparation of removing the cpu_stl_data() call,
inline it. Set the return address argument.

See commit 852d481faf7 ("SH: Improve movca.l/ocbi
emulation") for more context on this code.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251126202200.23100-11-philmd@linaro.org>

target/sh4/op_helper.c

index 557b1bf49723035aec99d32af82ac893b6cbb751..669bc84cb64227b02c9adfe92c9e2dc522850a48 100644 (file)
@@ -136,6 +136,8 @@ void helper_discard_movcal_backup(CPUSH4State *env)
 
 void helper_ocbi(CPUSH4State *env, uint32_t address)
 {
+    unsigned mmu_idx = cpu_mmu_index(env_cpu(env), false);
+    MemOpIdx oi = make_memop_idx(MO_TE | MO_UL | MO_UNALN, mmu_idx);
     memory_content **current = &(env->movcal_backup);
     while (*current)
     {
@@ -143,7 +145,8 @@ void helper_ocbi(CPUSH4State *env, uint32_t address)
         if ((a & ~0x1F) == (address & ~0x1F))
         {
             memory_content *next = (*current)->next;
-            cpu_stl_data(env, a, (*current)->value);
+
+            cpu_stl_mmu(env, a, (*current)->value, oi, GETPC());
 
             if (next == NULL)
             {