diff options
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 4158f92b08e..7b133b8705c 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -634,8 +634,15 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, /* 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, - total_size); + /* APPLE LOCAL begin do not use float fieldmode */ + /* If value was float, we munged it to be int above, so it + is never appropriate to use a float fieldmode here. */ + store_bit_field (tempreg, bitsize, bitpos, + (GET_MODE_CLASS (fieldmode) != MODE_INT + && GET_MODE_CLASS (fieldmode) != MODE_PARTIAL_INT) + ? GET_MODE (value) : fieldmode, + value, total_size); + /* APPLE LOCAL end do not use float fieldmode */ emit_move_insn (op0, tempreg); return value; } |