From: hjl@lucon.org (H.J. Lu)
To: wilson@cygnus.com, law@cygnus.com, scox@cygnus.com,
crux@pool.informatik.rwth-aachen.de
Cc: egcs@cygnus.com
Subject: More fp bug in egcs
Date: Sat, 25 Apr 1998 18:25:00 -0000 [thread overview]
Message-ID: <m0yTGCP-00059AC@ocean.lucon.org> (raw)
Hi,
I discovered this x86 fp bug by accident.
# gcc -B/home/work/gnu/bin/egcs/gcc/ -S mpgeomnn.c
gcc: Internal compiler error: program cc1 got fatal signal 6
It is very similar to the one fixed by Jim. It will compile if -O is
used. I think it may have something to do with Jim's patch. In the
greg rtl dump, the clobbered register is used as input in the next
insn.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---mpgeomnn.c---
typedef struct _geom_elem {
double coeffs[6];
double constant[3 ];
int do_band[3];
} pGeomDefRec, *pGeomDefPtr;
typedef struct _mpgeombanddef {
double first_mlow,
first_mhigh;
int first_ilow,
first_ihigh;
double *s_locs;
int *x_locs;
int x_start;
int x_end;
int int_constant;
int yOut;
int out_width;
int out_height;
int in_width;
int in_height;
int lo_src_available;
int hi_src_available;
void (*linefunc) ();
void (*fillfunc) ();
} mpGeometryBandRec, *mpGeometryBandPtr;
typedef void *pointer;
typedef unsigned char CARD8;
typedef CARD8 BytePixel;
static void BiGL_B (OUTP,srcimg,width,sline,pedpvt,pvtband) pointer OUTP; pointer *srcimg; register int width; int sline; pGeomDefPtr pedpvt; mpGeometryBandPtr pvtband; { register float s, t, st; register double a = pedpvt->coeffs[0]; register double c = pedpvt->coeffs[2]; register double srcpix = a * ((double)(0.0000)) + pedpvt->coeffs[1] * (pvtband->yOut + ((double)(0.0000)) ) + pedpvt->coeffs[4]; register double srcline = c * ((double)(0.0000)) + pedpvt->coeffs[3] * (pvtband->yOut + ((double)(0.0000)) ) + pedpvt->coeffs[5]; register int isrcline,isrcpix; register BytePixel constant = ( BytePixel ) pvtband-> int_constant ; register BytePixel *outp = ( BytePixel *) OUTP; register BytePixel *ptrIn, *ptrJn; register BytePixel val; register int srcwidth = pvtband->in_width - 1; register int minline = pvtband->lo_src_available; register int maxline = pvtband->hi_src_available; while ( width > 0 ) { isrcline = srcline; isrcpix = srcpix; val = constant; if ( (isrcline >= minline) && (isrcline < maxline) ) { s = srcpix - isrcpix; ptrIn = ( BytePixel *) srcimg[isrcline]; t = srcline - isrcline; ptrJn = ( BytePixel *) srcimg[isrcline+1]; st = s * t; if ( (isrcpix >= 0) && (isrcpix < srcwidth) ) val = ptrIn[isrcpix] * ((float)1. - s - t + st) + ptrIn[isrcpix+1] * (s - st) + ptrJn[isrcpix] * (t - st) + ptrJn[isrcpix+1] * (st) + (float)0.5 ; } width--; srcline += c; srcpix += a; *outp++ = val; } }
next reply other threads:[~1998-04-25 18:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-25 18:25 H.J. Lu [this message]
1998-04-27 21:29 ` Jim Wilson
1998-04-30 20:03 ` Jim Wilson
1998-05-02 18:56 ` H.J. Lu
1998-05-03 20:10 ` Jim Wilson
1998-05-05 0:35 ` Jeffrey A Law
1998-05-05 19:14 ` H.J. Lu
1998-05-06 11:49 ` Jim Wilson
1998-05-05 5:03 ` Jeffrey A Law
1998-05-06 17:12 ` A patch for PPro H.J. Lu
1998-05-06 18:14 ` Jeffrey A Law
1998-05-07 15:31 ` Jim Wilson
1998-05-03 0:55 More fp bug in egcs H.J. Lu
1998-05-03 12:03 ` H.J. Lu
1998-05-03 17:14 ` Jim Wilson
1998-05-04 11:17 ` H.J. Lu
1998-05-04 18:07 ` Jeffrey A Law
1998-05-04 18:07 ` H.J. Lu
1998-05-04 22:00 ` Jeffrey A Law
1998-05-08 16:04 ` Jeffrey A Law
1998-05-03 20:10 ` Jim Wilson
1998-05-05 5:46 ` Jeffrey A Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0yTGCP-00059AC@ocean.lucon.org \
--to=hjl@lucon.org \
--cc=crux@pool.informatik.rwth-aachen.de \
--cc=egcs@cygnus.com \
--cc=law@cygnus.com \
--cc=scox@cygnus.com \
--cc=wilson@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).