]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/arm: Use raw_write in cp_reg_reset
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 16 Sep 2025 14:22:11 +0000 (07:22 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 25 Sep 2025 14:42:34 +0000 (15:42 +0100)
Reduce the places that know about field types by 1.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.c

index c65af7e7614a638e5e44466813012159d565790c..91ae56dddb2f95d50ae1a038a2532921149326af 100644 (file)
@@ -192,14 +192,8 @@ static void cp_reg_reset(gpointer key, gpointer value, gpointer opaque)
      * This is basically only used for fields in non-core coprocessors
      * (like the pxa2xx ones).
      */
-    if (!ri->fieldoffset) {
-        return;
-    }
-
-    if (cpreg_field_is_64bit(ri)) {
-        CPREG_FIELD64(&cpu->env, ri) = ri->resetvalue;
-    } else {
-        CPREG_FIELD32(&cpu->env, ri) = ri->resetvalue;
+    if (ri->fieldoffset) {
+        raw_write(&cpu->env, ri, ri->resetvalue);
     }
 }