aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-05-11 14:50:11 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-05-11 14:50:11 -0700
commit2305bcadd5dd300d4463795a45a10f668a4f6ebc (patch)
tree354005203f6e35c76c9e39ddabfdd7981bb440b5 /gcc/expmed.c
parent7b3ab05e789445ae6b21463ec01cc2d77bd21171 (diff)
downloadgcc-2305bcadd5dd300d4463795a45a10f668a4f6ebc.zip
gcc-2305bcadd5dd300d4463795a45a10f668a4f6ebc.tar.gz
gcc-2305bcadd5dd300d4463795a45a10f668a4f6ebc.tar.bz2
(store_fixed_bit_field): Delete code to handle MODE_FLOAT values here.
(store_fixed_bit_field): Delete code to handle MODE_FLOAT values here. (store_bit_field): Put it here instead. From-SVN: r7279
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 8c23d8c..85cf0de 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -350,6 +350,17 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size)
op0 = protect_from_queue (op0, 1);
}
+ /* 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_FLOAT)
+ {
+ if (GET_CODE (value) != REG)
+ value = copy_to_reg (value);
+ value = gen_rtx (SUBREG, word_mode, value, 0);
+ }
+
/* Now OFFSET is nonzero only if OP0 is memory
and is therefore always measured in bytes. */
@@ -520,17 +531,6 @@ store_fixed_bit_field (op0, offset, bitsize, bitpos, value, struct_align)
int all_zero = 0;
int all_one = 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 (GET_MODE_CLASS (GET_MODE (value)) == MODE_FLOAT)
- {
- if (GET_CODE (value) != REG)
- value = copy_to_reg (value);
- value = gen_rtx (SUBREG, word_mode, value, 0);
- }
-
/* There is a case not handled here:
a structure with a known alignment of just a halfword
and a field split across two aligned halfwords within the structure.