Commit 2305bcad by Jim Wilson

(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
parent 7b3ab05e
...@@ -350,6 +350,17 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) ...@@ -350,6 +350,17 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size)
op0 = protect_from_queue (op0, 1); 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 /* Now OFFSET is nonzero only if OP0 is memory
and is therefore always measured in bytes. */ and is therefore always measured in bytes. */
...@@ -520,17 +531,6 @@ store_fixed_bit_field (op0, offset, bitsize, bitpos, value, struct_align) ...@@ -520,17 +531,6 @@ store_fixed_bit_field (op0, offset, bitsize, bitpos, value, struct_align)
int all_zero = 0; int all_zero = 0;
int all_one = 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: /* There is a case not handled here:
a structure with a known alignment of just a halfword a structure with a known alignment of just a halfword
and a field split across two aligned halfwords within the structure. and a field split across two aligned halfwords within the structure.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment