aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/fpu_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-07-08 10:42:55 -0700
committerRichard Henderson <rth@twiddle.net>2015-05-18 13:03:47 -0700
commit57a808b6d7f52a62111f6070933dfca6cd88a0fd (patch)
treef67dbfd1e90490321d26ad2337ac21466d9631f5 /target-alpha/fpu_helper.c
parent4ed069ab5334a495b49d0704795524fa34e8dbfc (diff)
target-alpha: Raise IOV from CVTQL
Even if an exception isn't taken, the status flags need updating and the result should be written to the destination. Move the body of cvtql out of line, since we now always need a call. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/fpu_helper.c')
-rw-r--r--target-alpha/fpu_helper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c
index fa4401d4d6..b091aa842a 100644
--- a/target-alpha/fpu_helper.c
+++ b/target-alpha/fpu_helper.c
@@ -539,9 +539,13 @@ uint64_t helper_cvtqt(CPUAlphaState *env, uint64_t a)
return float64_to_t(fr);
}
-void helper_cvtql_v_input(CPUAlphaState *env, uint64_t val)
+uint64_t helper_cvtql(CPUAlphaState *env, uint64_t val)
{
+ uint32_t exc = 0;
if (val != (int32_t)val) {
- arith_excp(env, GETPC(), EXC_M_IOV, 0);
+ exc = FPCR_IOV | FPCR_INE;
}
+ env->error_code = exc;
+
+ return ((val & 0xc0000000) << 32) | ((val & 0x3fffffff) << 29);
}