mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
f6b6b7b8a7
commit
c24a8a0b6d
3 changed files with 13 additions and 30 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue