From: Aldy Hernandez <aldyh@redhat.com>
To: Geoffrey Keating <geoffk@geoffk.org>
Cc: gcc@gcc.gnu.org
Subject: Re: rfc: constant pool and floats
Date: Sat, 16 Oct 2004 09:19:00 -0000 [thread overview]
Message-ID: <20041016023058.GA9787@redhat.com> (raw)
In-Reply-To: <m2lle77h93.fsf@greed.local>
> That's the problem. Clearly, (reg:SF 120) is not equal to the
> CONST_INT; it's equal to a SFmode CONST_DOUBLE.
I played around kludging the REG_EQUAL to be equal to a CONST_DOUBLE.
That didn't fix the problem because when we fill in the constant pool
(force_const_mem) with the value, we fill it in with a const_int/SFmode
pair, which still causes the abort while dumping the constant pool.
I can see 3 possible solutions:
(a) Change the const_int appropriately when filling in the constant pool
(in force_const_mem).
(b) Change the const_int in the backend before we call force_const_mem.
(c) Remove the code creating the const_int in the first place, thus
keeping the const_double as is. The offending code is:
/* If VALUE is a floating-point mode, access it as an integer of the
corresponding size. This can occur on a machine with 64 bit registers
that uses SFmode for float. This can also occur for unaligned float
structure fields. */
if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT
&& GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT)
value = gen_lowpart ((GET_MODE (value) == VOIDmode
? word_mode : int_mode_for_mode (GET_MODE (value))),
value);
All 3 options fix the regression, and PR1004.
What do you suggest? I don't understand if the code in question (snippet
above) is correct or not.
Thanks in advance.
Aldy
next prev parent reply other threads:[~2004-10-16 2:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 21:45 Aldy Hernandez
2004-10-15 23:04 ` Andrew Pinski
2004-10-16 1:07 ` Daniel Jacobowitz
2004-10-16 10:41 ` Aldy Hernandez
2004-10-16 2:31 ` Aldy Hernandez
2004-10-15 23:57 ` Geoffrey Keating
2004-10-16 9:19 ` Aldy Hernandez [this message]
2004-10-17 2:41 ` Geoff Keating
2004-10-17 15:40 ` Aldy Hernandez
2004-10-17 16:13 ` David Edelsohn
2004-10-17 16:58 ` Geoff Keating
2004-10-18 22:59 ` Aldy Hernandez
2004-10-19 4:04 ` Aldy Hernandez
2004-10-19 22:13 ` Aldy Hernandez
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=20041016023058.GA9787@redhat.com \
--to=aldyh@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=geoffk@geoffk.org \
/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).