diff options
author | Richard Henderson <rth@twiddle.net> | 2012-03-24 09:51:14 -0700 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-03-24 17:07:58 +0000 |
commit | 743434099d427c17f6c8f36de81a83f83ec13fb2 (patch) | |
tree | fb2bf1bfeaa126b9d3c786f44306c37c05ffe4e2 /target-alpha/helper.c | |
parent | c30827555d5305d42f7b164dc69a381c4882e77a (diff) |
target-alpha: Make use of fp_status.flush_inputs_to_zero.
This softfp feature post-dates the last major update to the Alpha
fpu translation. We can make use of this to eliminate at least
one helper function that was performing this operation by hand.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-alpha/helper.c')
-rw-r--r-- | target-alpha/helper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/target-alpha/helper.c b/target-alpha/helper.c index 3333bfa1b9..765e650002 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -82,7 +82,7 @@ uint64_t cpu_alpha_load_fpcr (CPUAlphaState *env) break; } - if (env->fpcr_dnz) { + if (env->fp_status.flush_inputs_to_zero) { r |= FPCR_DNZ; } if (env->fpcr_dnod) { @@ -151,12 +151,10 @@ void cpu_alpha_store_fpcr (CPUAlphaState *env, uint64_t val) } env->fpcr_dyn_round = t; - env->fpcr_flush_to_zero - = (val & (FPCR_UNDZ|FPCR_UNFD)) == (FPCR_UNDZ|FPCR_UNFD); - - env->fpcr_dnz = (val & FPCR_DNZ) != 0; env->fpcr_dnod = (val & FPCR_DNOD) != 0; env->fpcr_undz = (val & FPCR_UNDZ) != 0; + env->fpcr_flush_to_zero = env->fpcr_dnod & env->fpcr_undz; + env->fp_status.flush_inputs_to_zero = (val & FPCR_DNZ) != 0; } uint64_t helper_load_fpcr(CPUAlphaState *env) |