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
This commit is contained in:
Jan Hubicka 2001-07-20 22:07:58 +02:00 committed by Jan Hubicka
parent 00d0458c03
commit 371b8fc0bc
6 changed files with 34 additions and 2 deletions

View File

@ -1,3 +1,14 @@
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

View File

@ -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);

View File

@ -378,6 +378,9 @@ enum optab_index
OTI_cmov,
OTI_cstore,
/* Push instruction. */
OTI_push,
OTI_MAX
};
@ -437,6 +440,7 @@ extern optab optab_table[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];

View File

@ -128,6 +128,7 @@ const char * const optabs[] =
"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$)",

View File

@ -4682,6 +4682,7 @@ init_optabs ()
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++)
{

View File

@ -998,6 +998,9 @@ set_noop_p (set)
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)