summaryrefslogtreecommitdiff
path: root/target-alpha/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-06-28 12:57:03 -0700
committerRichard Henderson <rth@twiddle.net>2015-05-18 13:03:46 -0700
commitc24a8a0b6dad5a33d84f5fb846edb28c43312c71 (patch)
tree4b487df6150472cd1883598aef313072a0b8a418 /target-alpha/translate.c
parentf6b6b7b8a775f97edab43eb672d5991f534c2e61 (diff)
downloadqemu-c24a8a0b6dad5a33d84f5fb846edb28c43312c71.tar.gz
target-alpha: Raise IOV from CVTTQ
Floating-point overflow is a different bit from integer overflow. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r--target-alpha/translate.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index f12132004a..7868cc45a7 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -760,23 +760,14 @@ static void gen_cvttq(DisasContext *ctx, int rb, int rc, int fn11)
vb = gen_ieee_input(ctx, rb, fn11, 0);
vc = dest_fpr(ctx, rc);
- /* Almost all integer conversions use cropped rounding, and most
- also do not have integer overflow enabled. Special case that. */
- switch (fn11) {
- case QUAL_RM_C:
+ /* Almost all integer conversions use cropped rounding;
+ special case that. */
+ if ((fn11 & QUAL_RM_MASK) == QUAL_RM_C) {
gen_helper_cvttq_c(vc, cpu_env, vb);
- break;
- case QUAL_V | QUAL_RM_C:
- case QUAL_S | QUAL_V | QUAL_RM_C:
- case QUAL_S | QUAL_V | QUAL_I | QUAL_RM_C:
- gen_helper_cvttq_svic(vc, cpu_env, vb);
- break;
- default:
+ } else {
gen_qual_roundmode(ctx, fn11);
gen_helper_cvttq(vc, cpu_env, vb);
- break;
}
-
gen_fp_exc_raise(rc, fn11);
}