From: Aldy Hernandez <aldyh@redhat.com>
To: Geoff Keating <geoffk@geoffk.org>
Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: rfc: constant pool and floats
Date: Mon, 18 Oct 2004 22:59:00 -0000 [thread overview]
Message-ID: <20041018194401.GA10263@redhat.com> (raw)
In-Reply-To: <09F32B26-1FE6-11D9-8BC7-000A95B1F520@geoffk.org>
> Aha! So it should not do that. I think the right thing to do is to
> pass the original VALUE here, but if that doesn't work, try passing the
> mode of VALUE instead of FIELDMODE (the mode of VALUE is the mode that
> got passed to gen_lowpart).
Neato. Passing the original value does the trick.
Bootstraped on powerpc-linux.
OK, pending on tests completion?
Aldy
* expmed.c (store_bit_field): Pass original 'value' before
recursing.
Index: expmed.c
===================================================================
RCS file: /cvs/uberbaum/gcc/expmed.c,v
retrieving revision 1.198
diff -c -p -r1.198 expmed.c
*** expmed.c 7 Oct 2004 05:56:51 -0000 1.198
--- expmed.c 18 Oct 2004 19:42:03 -0000
*************** store_bit_field (rtx str_rtx, unsigned H
*** 338,343 ****
--- 338,344 ----
unsigned HOST_WIDE_INT bitpos = bitnum % unit;
rtx op0 = str_rtx;
int byte_offset;
+ rtx orig_value;
enum machine_mode op_mode = mode_for_extraction (EP_insv, 3);
*************** store_bit_field (rtx str_rtx, unsigned H
*** 601,606 ****
--- 602,608 ----
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. */
+ orig_value = value;
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
*************** store_bit_field (rtx str_rtx, unsigned H
*** 667,673 ****
/* Fetch that unit, store the bitfield in it, then store
the unit. */
tempreg = copy_to_reg (op0);
! store_bit_field (tempreg, bitsize, bitpos, fieldmode, value);
emit_move_insn (op0, tempreg);
return value;
}
--- 669,675 ----
/* Fetch that unit, store the bitfield in it, then store
the unit. */
tempreg = copy_to_reg (op0);
! store_bit_field (tempreg, bitsize, bitpos, fieldmode, orig_value);
emit_move_insn (op0, tempreg);
return value;
}
next prev parent reply other threads:[~2004-10-18 19:44 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
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 [this message]
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=20041018194401.GA10263@redhat.com \
--to=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--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).