Commit de1b33dd by Alexandre Oliva Committed by Alexandre Oliva

expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded into register…

expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded into register was forced into memory.

* expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded
into register was forced into memory.

From-SVN: r39301
parent 8a8de62d
2001-01-27 Alexandre Oliva <aoliva@redhat.com> 2001-01-27 Alexandre Oliva <aoliva@redhat.com>
* expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded
into register was forced into memory.
2001-01-27 Alexandre Oliva <aoliva@redhat.com>
* Makefile.in: Remove uses of + before $(MAKE). * Makefile.in: Remove uses of + before $(MAKE).
2001-01-26 Richard Henderson <rth@redhat.com> 2001-01-26 Richard Henderson <rth@redhat.com>
......
...@@ -2709,6 +2709,8 @@ emit_move_insn (x, y) ...@@ -2709,6 +2709,8 @@ emit_move_insn (x, y)
rtx x, y; rtx x, y;
{ {
enum machine_mode mode = GET_MODE (x); enum machine_mode mode = GET_MODE (x);
rtx y_cst = NULL_RTX;
rtx last_insn;
x = protect_from_queue (x, 1); x = protect_from_queue (x, 1);
y = protect_from_queue (y, 0); y = protect_from_queue (y, 0);
...@@ -2720,7 +2722,10 @@ emit_move_insn (x, y) ...@@ -2720,7 +2722,10 @@ emit_move_insn (x, y)
if (GET_CODE (y) == CONSTANT_P_RTX) if (GET_CODE (y) == CONSTANT_P_RTX)
; ;
else if (CONSTANT_P (y) && ! LEGITIMATE_CONSTANT_P (y)) else if (CONSTANT_P (y) && ! LEGITIMATE_CONSTANT_P (y))
{
y_cst = y;
y = force_const_mem (mode, y); y = force_const_mem (mode, y);
}
/* If X or Y are memory references, verify that their addresses are valid /* If X or Y are memory references, verify that their addresses are valid
for the machine. */ for the machine. */
...@@ -2740,7 +2745,13 @@ emit_move_insn (x, y) ...@@ -2740,7 +2745,13 @@ emit_move_insn (x, y)
if (mode == BLKmode) if (mode == BLKmode)
abort (); abort ();
return emit_move_insn_1 (x, y); last_insn = emit_move_insn_1 (x, y);
if (y_cst && GET_CODE (x) == REG)
REG_NOTES (last_insn)
= gen_rtx_EXPR_LIST (REG_EQUAL, y_cst, REG_NOTES (last_insn));
return last_insn;
} }
/* Low level part of emit_move_insn. /* Low level part of emit_move_insn.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment