public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* patch for HJ's alpha isinff problem
       [not found] ` <m0y4Y8U-00058fC@ocean.lucon.org>
@ 1998-02-16 15:58   ` Richard Henderson
  1998-02-16 16:56     ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 1998-02-16 15:58 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Richard Kenner, rth, egcs

> > int isinff(float x)
> > {
> >   int32_t ix,t;
> >   ieee_float_shape_type gf_u;
> >   gf_u.value = x;
> >   ix = gf_u.word;
> >   if (ix == 0)

[...]

> > 	stt $f16,16($30)
> > 	ldq $4,16($30)
> > 	addl $4,$31,$1
> > 	bis $1,$1,$9

This is clearly bad code, since values are stored in floating point
registers in DFmode format, an SFmode store is required to get it 
out again.  The bit pattern placed in $1 bears no resemblance to the
SFmode value that was desired.

The problem is that combine is not obeying CLASS_CANNOT_CHANGE_SIZE.

Here is a patch that fixes what is exposed by HJ's test case, though
I am sure there are other places that are still broken.  The patch
is against egcs current, but it applies correctly to 2.8.1 with a 
little fuzz.

There is a small optimization in reload that could be made that is
exposed by this patch, in that it generates

	ldl $2,15($30)
	addl $2,$31,$1

The sign extend is of course redundant.  We ought to teach reload
to look for a sign-extending load pattern, but I don't attempt that
here.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch for HJ's alpha isinff problem
  1998-02-16 15:58   ` patch for HJ's alpha isinff problem Richard Henderson
@ 1998-02-16 16:56     ` Richard Henderson
  1998-02-17 23:59       ` Jeffrey A Law
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 1998-02-16 16:56 UTC (permalink / raw)
  To: Richard Henderson; +Cc: H.J. Lu, Richard Kenner, egcs

On Mon, Feb 16, 1998 at 04:03:31PM -0800, I wrote:
> Here is a patch that fixes what is exposed by HJ's test case, though
> I am sure there are other places that are still broken.  The patch
> is against egcs current, but it applies correctly to 2.8.1 with a 
> little fuzz.

Bother.  There's a bug in what I just sent -- the expand_compound_operation
bit should check the code of the operation before proceeding.  A revised
patch is attached.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch for HJ's alpha isinff problem
  1998-02-16 16:56     ` Richard Henderson
@ 1998-02-17 23:59       ` Jeffrey A Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1998-02-17 23:59 UTC (permalink / raw)
  To: Richard Henderson; +Cc: H.J. Lu, Richard Kenner, egcs

  In message < 19980216170138.27223@dot.cygnus.com >you write:
  > Bother.  There's a bug in what I just sent -- the expand_compound_operation
  > bit should check the code of the operation before proceeding.  A revised
  > patch is attached.
  > 
  > 
  > r~
  > 
  > --yrj/dFKFPuw6o+aM
  > Content-Type: text/plain; charset=us-ascii
  > Content-Disposition: attachment; filename=d-ccs
  > 
  > Mon Feb 16 15:11:11 1998  Richard Henderson  <rth@cygnus.com>
  > 
  > 	* combine.c (simplify_rtx): Obey CLASS_CANNOT_CHANGE_SIZE when
  > 	simplifying a subreg of a hard reg.
  > 	(expand_compound_operation): Likewise.
  > 	(force_to_mode): Likewise.
Looks good to me.  Installed on both the release and into the mainline
sources.

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-02-17 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9802161123.AA20638@vlsi1.ultra.nyu.edu>
     [not found] ` <m0y4Y8U-00058fC@ocean.lucon.org>
1998-02-16 15:58   ` patch for HJ's alpha isinff problem Richard Henderson
1998-02-16 16:56     ` Richard Henderson
1998-02-17 23:59       ` Jeffrey A Law

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).