public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@cygnus.com>
To: John Carr <jfc@mit.edu>
Cc: egcs@cygnus.com
Subject: Re: HOST_WIDE_INT = long long patches
Date: Tue, 21 Apr 1998 23:21:00 -0000	[thread overview]
Message-ID: <199804220053.RAA21350@rtl.cygnus.com> (raw)
In-Reply-To: <199804191934.PAA18086@jfc.>

This change in final.c (split_double) doesn't look like it will work.

! 	  high = GEN_INT (INTVAL (value) << (HOST_BITS_PER_WIDE_INT - 2 * BITS_PER_WORD) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD));

If HOST_BITS_PER_WIDE_INT and BITS_PER_WORD are the same, then you end up with
a negative shift count for the first shift, which is undefined.

This change in reload.c (find_reloads) is unsafe.

! 		if ((GET_CODE (operand) == CONST_DOUBLE
! 		     || (HOST_BITS_PER_WIDE_INT > BITS_PER_WORD
! 			 && GET_CODE (operand) == CONST_INT))
  		    && CONST_DOUBLE_OK_FOR_LETTER_P (operand, c))

This is because some ports make the assumption that the input to
CONST_DOUBLE_OK_FOR_LETTER_P is a CONST_DOUBLE, and will fail if it isn't.
For instance, alpha.h references CONST_DOUBLE_{LOW,HIGH} without verifying
that it is a CONST_DOUBLE.  Also, if we are going to do this, we should
modify the CONST_DOUBLE_OK_FOR_LETTER_P documentation in tm.texi to indicate
that the operand could be either a CONST_DOUBLE or a CONST_INT.

Likewise, the similar change to recog.c is unsafe.

The emit-rtl.c change looks OK.

Jim

  parent reply	other threads:[~1998-04-21 23:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-19 15:57 John Carr
1998-04-21 23:21 ` Jeffrey A Law
1998-04-21 23:21 ` Jim Wilson [this message]
1998-04-22  4:19   ` John Carr
1998-04-22 12:13     ` Jim Wilson

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=199804220053.RAA21350@rtl.cygnus.com \
    --to=wilson@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=jfc@mit.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).