Skip to contentSkip to conversation

alpha-user: Initialize FPCR with round-to-nearest.

PATCH In review Richard Henderson 2 participants 4 messages Mar 11, 2012 – Mar 19, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alpha-user: Initialize FPCR with round-to-nearest.

---
 target-alpha/translate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
target-alpha/translate.c +2 -1
index 1d2142b..fe78630 100644
@@ -3513,7 +3513,8 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
 #if defined (CONFIG_USER_ONLY)
     env->ps = PS_USER_MODE;
     cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
-                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD));
+                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD
+                               | FPCR_DYN_NORMAL));
 #endif
     env->lock_addr = -1;
     env->fen = 1;
Signature · 1 line
1.7.7.6
#1 lore raw

Ping.

Quoted 19 lines · Richard Henderson
---
 target-alpha/translate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
target-alpha/translate.c +2 -1
index 1d2142b..fe78630 100644
@@ -3513,7 +3513,8 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
 #if defined (CONFIG_USER_ONLY)
     env->ps = PS_USER_MODE;
     cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
-                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD));
+                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD
+                               | FPCR_DYN_NORMAL));
 #endif
     env->lock_addr = -1;
     env->fen = 1;
#2 lore raw

Am 17.03.2012 20:30, schrieb Richard Henderson:

Quoted 1 line

Ping.

This is linux-user, so cc'ing Riku.

Code looks sane at first sight although I have no clue of the constants' meaning and effect. ;)

Commit message doesn't mention it but I guess this fixes some bug? How does it round before the patch?

Andreas

Quoted 21 lines · Richard Henderson
Quoted 19 lines
---
 target-alpha/translate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
target-alpha/translate.c +2 -1
index 1d2142b..fe78630 100644
@@ -3513,7 +3513,8 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
 #if defined (CONFIG_USER_ONLY)
     env->ps = PS_USER_MODE;
     cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
-                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD));
+                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD
+                               | FPCR_DYN_NORMAL));
 #endif
     env->lock_addr = -1;
     env->fen = 1;
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#3 lore raw
Quoted 10 lines · Andreas Färber

Am 17.03.2012 20:30, schrieb Richard Henderson:

Quoted 1 line

Ping.

This is linux-user, so cc'ing Riku.

Code looks sane at first sight although I have no clue of the constants' meaning and effect. ;)

Commit message doesn't mention it but I guess this fixes some bug? How does it round before the patch?

It does round-to-zero before the patch.

r~