From 42235f853e242b9eff7a5fdeedbc742e8cffdfbc Mon Sep 17 00:00:00 2001 From: Geoff Keating Date: Sat, 26 Feb 2000 20:03:11 +0000 Subject: elfos.h (ASM_OUTPUT_LABELREF): Don't define. * config/elfos.h (ASM_OUTPUT_LABELREF): Don't define. The default is right for most ELF targets. * config/ns32k/ns32k.h (ASM_OUTPUT_LABELREF): Don't define. Let the default file use %U properly. * config/sh/elf.h (ASM_OUTPUT_LABELREF): Don't define. Use the default. * config/fp-bit.c (pack_d): Properly handle rounding of denormal numbers. From-SVN: r32183 --- gcc/config/fp-bit.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'gcc/config/fp-bit.c') diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c index 8e9df1c..4d894e7 100644 --- a/gcc/config/fp-bit.c +++ b/gcc/config/fp-bit.c @@ -502,8 +502,25 @@ pack_d ( fp_number_type * src) } else { - /* Shift by the value */ - fraction >>= shift; + int lowbit = (fraction & ((1 << shift) - 1)) ? 1 : 0; + fraction = (fraction >> shift) | lowbit; + } + if ((fraction & GARDMASK) == GARDMSB) + { + if ((fraction & (1 << NGARDS))) + fraction += GARDROUND + 1; + } + else + { + /* Add to the guards to round up. */ + fraction += GARDROUND; + } + /* Perhaps the rounding means we now need to change the + exponent. */ + if (fraction >= IMPLICIT_2) + { + fraction >>= 1; + exp += 1; } fraction >>= NGARDS; } -- cgit v1.1