* 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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44210
138bc75d-0d04-0410-961f-
82ee72b054a4
+Fri Jul 20 21:59:42 CEST 2001 Jan Hubicka <jh@suse.cz>
+
+ * 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
+
2001-07-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.md ("movdi", "movdi_internal"): Use an
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
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);
OTI_cmov,
OTI_cstore,
+ /* Push instruction. */
+ OTI_push,
+
OTI_MAX
};
#define cbranch_optab (optab_table[OTI_cbranch])
#define cmov_optab (optab_table[OTI_cmov])
#define cstore_optab (optab_table[OTI_cstore])
+#define push_optab (optab_table[OTI_push])
/* Tables of patterns for extending one integer mode to another. */
extern enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2];
"cbranch_optab->handlers[$A].insn_code = CODE_FOR_$(cbranch$a4$)",
"cmov_optab->handlers[$A].insn_code = CODE_FOR_$(cmov$a6$)",
"cstore_optab->handlers[$A].insn_code = CODE_FOR_$(cstore$a4$)",
+ "push_optab->handlers[$A].insn_code = CODE_FOR_$(push$a1$)",
"reload_in_optab[$A] = CODE_FOR_$(reload_in$a$)",
"reload_out_optab[$A] = CODE_FOR_$(reload_out$a$)",
"movstr_optab[$A] = CODE_FOR_$(movstr$a$)",
cbranch_optab = init_optab (UNKNOWN);
cmov_optab = init_optab (UNKNOWN);
cstore_optab = init_optab (UNKNOWN);
+ push_optab = init_optab (UNKNOWN);
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
if (GET_CODE (dst) == MEM && GET_CODE (src) == MEM)
return rtx_equal_p (dst, src);
+ if (dst == pc_rtx && src == pc_rtx)
+ return 1;
+
if (GET_CODE (dst) == SIGN_EXTRACT
|| GET_CODE (dst) == ZERO_EXTRACT)
return rtx_equal_p (XEXP (dst, 0), src)