From 533af0dbea0eb67867ded648483c9c640a575f0b Mon Sep 17 00:00:00 2001 From: hubicka Date: Thu, 28 Aug 2008 20:12:57 +0000 Subject: * expmed.c (store_bit_field_1): Be prepared for movstrict expander to fail. * predict.c (always_optimize_for_size_p): Rename to ... (optimize_function_for_size): ... this one; make extern. (optimize_function_for_speed_p): New. (optimize_bb_for_size_p, optimize_bb_for_size_p, optimize_edge_for_size_p,optimize_edge_for_size_p, optimize_insn_for_size_p, optimize_insn_for_size_p): Update. * basic-block.h (optimize_function_for_size_p, optimize_function_for_speed_p): Declare. * i386.md (optimize_size checks): Replace them by appropriate predicate. (standard_80387_constant_p, ix86_compute_frame_layout, ix86_expand_epilogue, ix86_decompose_address, print_operand, emit_i387_cw_initialization, inline_memory_move_cost, ix86_pad_returns, ix86_reorg): Replace optimize_size checks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139737 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/expmed.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gcc/expmed.c') diff --git a/gcc/expmed.c b/gcc/expmed.c index b102241dbb1..8212992d10d 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -521,6 +521,8 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, != CODE_FOR_nothing)) { int icode = optab_handler (movstrict_optab, fieldmode)->insn_code; + rtx insn; + rtx start = get_last_insn (); /* Get appropriate low part of the value being stored. */ if (GET_CODE (value) == CONST_INT || REG_P (value)) @@ -544,13 +546,17 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, op0 = SUBREG_REG (op0); } - emit_insn (GEN_FCN (icode) + insn = (GEN_FCN (icode) (gen_rtx_SUBREG (fieldmode, op0, (bitnum % BITS_PER_WORD) / BITS_PER_UNIT + (offset * UNITS_PER_WORD)), value)); - - return true; + if (insn) + { + emit_insn (insn); + return true; + } + delete_insns_since (start); } /* Handle fields bigger than a word. */ -- cgit v1.2.1