|
@@ -118,7 +118,8 @@ static void partsN(canonicalize)(FloatPartsN *p, float_status *status,
|
|
|
} else {
|
|
|
int shift = frac_normalize(p);
|
|
|
p->cls = float_class_normal;
|
|
|
- p->exp = fmt->frac_shift - fmt->exp_bias - shift + 1;
|
|
|
+ p->exp = fmt->frac_shift - fmt->exp_bias
|
|
|
+ - shift + !fmt->m68k_denormal;
|
|
|
}
|
|
|
} else if (likely(p->exp < fmt->exp_max) || fmt->arm_althp) {
|
|
|
p->cls = float_class_normal;
|
|
@@ -256,7 +257,7 @@ static void partsN(uncanon_normal)(FloatPartsN *p, float_status *s,
|
|
|
is_tiny = !frac_addi(&discard, p, inc);
|
|
|
}
|
|
|
|
|
|
- frac_shrjam(p, 1 - exp);
|
|
|
+ frac_shrjam(p, !fmt->m68k_denormal - exp);
|
|
|
|
|
|
if (p->frac_lo & round_mask) {
|
|
|
/* Need to recompute round-to-even/round-to-odd. */
|
|
@@ -287,7 +288,7 @@ static void partsN(uncanon_normal)(FloatPartsN *p, float_status *s,
|
|
|
p->frac_lo &= ~round_mask;
|
|
|
}
|
|
|
|
|
|
- exp = (p->frac_hi & DECOMPOSED_IMPLICIT_BIT) != 0;
|
|
|
+ exp = (p->frac_hi & DECOMPOSED_IMPLICIT_BIT) && !fmt->m68k_denormal;
|
|
|
frac_shr(p, frac_shift);
|
|
|
|
|
|
if (is_tiny && (flags & float_flag_inexact)) {
|