Skip to contentSkip to conversation

target/alpha: Fix user-only initialization of fpcr

PATCH New Richard Henderson 1 participant 1 message Jan 5, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/alpha: Fix user-only initialization of fpcr

When the representation of fpcr was changed, the user-only initialization was not updated to match. Oops.

---
 target/alpha/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
target/alpha/cpu.c +3 -3
index a953897fcc..1fd95d6c0f 100644
@@ -205,9 +205,9 @@ static void alpha_cpu_initfn(Object *obj)
     env->lock_addr = -1;
 #if defined(CONFIG_USER_ONLY)
     env->flags = ENV_FLAG_PS_USER | ENV_FLAG_FEN;
-    cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
-                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD
-                               | FPCR_DYN_NORMAL));
+    cpu_alpha_store_fpcr(env, (uint64_t)(FPCR_INVD | FPCR_DZED | FPCR_OVFD
+                                         | FPCR_UNFD | FPCR_INED | FPCR_DNOD
+                                         | FPCR_DYN_NORMAL) << 32);
 #else
     env->flags = ENV_FLAG_PAL_MODE | ENV_FLAG_FEN;
 #endif
Signature · 1 line
2.17.2