diff options
author | Jan Hubicka <jh@suse.cz> | 2001-07-20 22:07:58 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-07-20 20:07:58 +0000 |
commit | 371b8fc0bc89750fd5aac47eda61cc7db7cf7f53 (patch) | |
tree | 6b4648cbef7b5a4a201860a0d8db5f383b7ca3ce /gcc/expr.c | |
parent | 00d0458c03fc77ca4d52412d47b23a09106e3696 (diff) | |
download | gcc-371b8fc0bc89750fd5aac47eda61cc7db7cf7f53.zip gcc-371b8fc0bc89750fd5aac47eda61cc7db7cf7f53.tar.gz gcc-371b8fc0bc89750fd5aac47eda61cc7db7cf7f53.tar.bz2 |
rtlanal.c (set_noop_p): Return true for noop jumps.
* rtlanal.c (set_noop_p): Return true for noop jumps.
* expr.c (emit_single_push_insn): Add call to push expander.
* expr.h (optab_index): Add OTI_push
(push_optab): New constant.
* genopinit.c (optabs): Add push_optab.
* optabs.c (init_optab): Init push optab.
* md.texi (push??1): Document
From-SVN: r44210
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -3155,7 +3155,21 @@ emit_single_push_insn (mode, x, type) rtx dest_addr; unsigned rounded_size = PUSH_ROUNDING (GET_MODE_SIZE (mode)); rtx dest; + enum insn_code icode; + insn_operand_predicate_fn pred; + stack_pointer_delta += PUSH_ROUNDING (GET_MODE_SIZE (mode)); + /* If there is push pattern, use it. Otherwise try old way of throwing + MEM representing push operation to move expander. */ + icode = push_optab->handlers[(int) mode].insn_code; + if (icode != CODE_FOR_nothing) + { + if (((pred = insn_data[(int) icode].operand[0].predicate) + && !((*pred) (x, mode)))) + x = force_reg (mode, x); + emit_insn (GEN_FCN (icode) (x)); + return; + } if (GET_MODE_SIZE (mode) == rounded_size) dest_addr = gen_rtx_fmt_e (STACK_PUSH_CODE, Pmode, stack_pointer_rtx); else @@ -3172,8 +3186,6 @@ emit_single_push_insn (mode, x, type) dest = gen_rtx_MEM (mode, dest_addr); - stack_pointer_delta += PUSH_ROUNDING (GET_MODE_SIZE (mode)); - if (type != 0) { set_mem_attributes (dest, type, 1); |