From: Jim Wilson Date: Wed, 11 May 1994 21:50:11 +0000 (-0700) Subject: (store_fixed_bit_field): Delete code to handle MODE_FLOAT values here. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2305bcadd5dd300d4463795a45a10f668a4f6ebc;p=gcc.git (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 --- diff --git a/gcc/expmed.c b/gcc/expmed.c index 8c23d8c8933..85cf0dec520 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.