summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-09 20:28:14 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-09 20:28:14 +0000
commit2b701a08b1b220b4fccb3ebf38f5e5ae25d148ed (patch)
tree17c387c65a3e8f4e3f41a72dac3abe9fb8d0a892 /gcc/expmed.c
parentaff33799ed78904217684c80677b8a1d36b7e2dc (diff)
downloadgcc-2b701a08b1b220b4fccb3ebf38f5e5ae25d148ed.tar.gz
* simplify-rtx.c (simplify_subreg): In the CONCAT case, check whether
the request subreg is entirely contained in the requested component. (simplify_gen_subreg): Return null for CONCATs that are rejected by simplify_subreg. * expmed.c (store_bit_field): Create a temporary when changing the value to an integer mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91965 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 47fc2d2bd47..10a95b3862a 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -591,16 +591,18 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
offset = 0;
}
- /* 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 VALUE has a floating-point or complex 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. It can also
+ occur for unaligned float or complex fields. */
orig_value = value;
- if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT
+ if (GET_MODE (value) != VOIDmode
+ && 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);
+ {
+ value = gen_reg_rtx (int_mode_for_mode (GET_MODE (value)));
+ emit_move_insn (gen_lowpart (GET_MODE (orig_value), value), orig_value);
+ }
/* Now OFFSET is nonzero only if OP0 is memory
and is therefore always measured in bytes. */