public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: "H.J. Lu" <hjl@lucon.org>
Cc: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>,
	rth@cygnus.com, egcs@cygnus.com
Subject: patch for HJ's alpha isinff problem
Date: Mon, 16 Feb 1998 15:58:00 -0000	[thread overview]
Message-ID: <19980216160331.34598@dot.cygnus.com> (raw)
In-Reply-To: <m0y4Y8U-00058fC@ocean.lucon.org>

> > 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~

       reply	other threads:[~1998-02-16 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9802161123.AA20638@vlsi1.ultra.nyu.edu>
     [not found] ` <m0y4Y8U-00058fC@ocean.lucon.org>
1998-02-16 15:58   ` Richard Henderson [this message]
1998-02-16 16:56     ` Richard Henderson
1998-02-17 23:59       ` 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=19980216160331.34598@dot.cygnus.com \
    --to=rth@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=hjl@lucon.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    /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).