mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/arm: Use raw_write in cp_reg_reset
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>
This commit is contained in:
committed by
Peter Maydell
parent
acf2b6e6b9
commit
45fc665f8b
+2
-8
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user