summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-28 20:12:57 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-28 20:12:57 +0000
commit533af0dbea0eb67867ded648483c9c640a575f0b (patch)
tree8c6d11ca056bf4f2369b1efc79b5526d46a6430d /gcc/expmed.c
parent5992d16a364e0b462e716b06504ae7b30bdc5696 (diff)
downloadgcc-533af0dbea0eb67867ded648483c9c640a575f0b.tar.gz
* 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
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c12
1 files changed, 9 insertions, 3 deletions
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. */