diff options
author | Richard Henderson | 2014-07-08 19:42:55 +0200 |
---|---|---|
committer | Richard Henderson | 2015-05-18 22:03:47 +0200 |
commit | 57a808b6d7f52a62111f6070933dfca6cd88a0fd (patch) | |
tree | f67dbfd1e90490321d26ad2337ac21466d9631f5 /target-alpha/fpu_helper.c | |
parent | target-alpha: Suppress underflow from CVTTQ if DNZ (diff) | |
download | qemu-57a808b6d7f52a62111f6070933dfca6cd88a0fd.tar.gz qemu-57a808b6d7f52a62111f6070933dfca6cd88a0fd.tar.xz qemu-57a808b6d7f52a62111f6070933dfca6cd88a0fd.zip |
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.c | 8 |
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); } |