mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-19 12:04:37 +08:00
expr.c (reload.h): Now included.
* expr.c (reload.h): Now included. (emit_block_move): Set volatile_ok when checking for movstr. (emit_move_1): Check for replacements in addresses in multi-word case. * Makefile.in (expr.o): Now includes reload.h. From-SVN: r33155
This commit is contained in:
parent
314883b80a
commit
3ef1eef42a
@ -1,5 +1,10 @@
|
||||
Fri Apr 14 18:07:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* expr.c (reload.h): Now included.
|
||||
(emit_block_move): Set volatile_ok when checking for movstr.
|
||||
(emit_move_1): Check for replacements in addresses in multi-word case.
|
||||
* Makefile.in (expr.o): Now includes reload.h.
|
||||
|
||||
* flow.c (count_basic_blocks): Remove unused var PREV_CALL.
|
||||
Never have a LIBCALL end a basic block.
|
||||
(find_basic_blocks_1): Likewise.
|
||||
|
@ -1533,7 +1533,7 @@ except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
|
||||
expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
|
||||
$(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h $(RECOG_H) \
|
||||
output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h \
|
||||
$(GGC_H) intl.h
|
||||
reload.h $(GGC_H) intl.h
|
||||
builtins.o : builtins.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
|
||||
function.h $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h \
|
||||
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
|
||||
|
32
gcc/expr.c
32
gcc/expr.c
@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */
|
||||
/* Include expr.h after insn-config.h so we get HAVE_conditional_move. */
|
||||
#include "expr.h"
|
||||
#include "recog.h"
|
||||
#include "reload.h"
|
||||
#include "output.h"
|
||||
#include "typeclass.h"
|
||||
#include "defaults.h"
|
||||
@ -1626,6 +1627,9 @@ emit_block_move (x, y, size, align)
|
||||
rtx opalign = GEN_INT (align / BITS_PER_UNIT);
|
||||
enum machine_mode mode;
|
||||
|
||||
/* Since this is a move insn, we don't care about volatility. */
|
||||
volatile_ok = 1;
|
||||
|
||||
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode;
|
||||
mode = GET_MODE_WIDER_MODE (mode))
|
||||
{
|
||||
@ -1661,6 +1665,7 @@ emit_block_move (x, y, size, align)
|
||||
if (pat)
|
||||
{
|
||||
emit_insn (pat);
|
||||
volatile_ok = 0;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@ -1668,6 +1673,8 @@ emit_block_move (x, y, size, align)
|
||||
}
|
||||
}
|
||||
|
||||
volatile_ok = 0;
|
||||
|
||||
/* X, Y, or SIZE may have been passed through protect_from_queue.
|
||||
|
||||
It is unsafe to save the value generated by protect_from_queue
|
||||
@ -2720,7 +2727,7 @@ emit_move_insn_1 (x, y)
|
||||
else if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
|
||||
{
|
||||
rtx last_insn = 0;
|
||||
rtx seq;
|
||||
rtx seq, inner;
|
||||
int need_clobber;
|
||||
|
||||
#ifdef PUSH_ROUNDING
|
||||
@ -2734,6 +2741,29 @@ emit_move_insn_1 (x, y)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we are in reload, see if either operand is a MEM whose address
|
||||
is scheduled for replacement. */
|
||||
if (reload_in_progress && GET_CODE (x) == MEM
|
||||
&& (inner = find_replacement (&XEXP (x, 0))) != XEXP (x, 0))
|
||||
{
|
||||
rtx new = gen_rtx_MEM (GET_MODE (x), inner);
|
||||
|
||||
RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
|
||||
MEM_COPY_ATTRIBUTES (new, x);
|
||||
MEM_ALIAS_SET (new) = MEM_ALIAS_SET (x);
|
||||
x = new;
|
||||
}
|
||||
if (reload_in_progress && GET_CODE (y) == MEM
|
||||
&& (inner = find_replacement (&XEXP (y, 0))) != XEXP (y, 0))
|
||||
{
|
||||
rtx new = gen_rtx_MEM (GET_MODE (y), inner);
|
||||
|
||||
RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (y);
|
||||
MEM_COPY_ATTRIBUTES (new, y);
|
||||
MEM_ALIAS_SET (new) = MEM_ALIAS_SET (y);
|
||||
y = new;
|
||||
}
|
||||
|
||||
start_sequence ();
|
||||
|
||||
need_clobber = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user