Commit 02214a5c by Richard Kenner

(emit_libcall_block): Before adding an REG_EQUAL note, check that it will really…

(emit_libcall_block): Before adding an REG_EQUAL note, check that it will really apply to a single instruction.

(emit_libcall_block): Before adding an REG_EQUAL note, check that it will
really apply to a single instruction.
(expand_binop, expand_fix): Likewise.

From-SVN: r13005
parent 39647dcb
...@@ -964,6 +964,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) ...@@ -964,6 +964,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if (i == GET_MODE_BITSIZE (mode) / BITS_PER_WORD) if (i == GET_MODE_BITSIZE (mode) / BITS_PER_WORD)
{ {
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
{
rtx temp = emit_move_insn (target, target); rtx temp = emit_move_insn (target, target);
REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL, REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
...@@ -971,6 +973,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) ...@@ -971,6 +973,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
copy_rtx (xop0), copy_rtx (xop0),
copy_rtx (xop1)), copy_rtx (xop1)),
REG_NOTES (temp)); REG_NOTES (temp));
}
return target; return target;
} }
else else
...@@ -1144,12 +1147,15 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) ...@@ -1144,12 +1147,15 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if (temp != 0) if (temp != 0)
{ {
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
{
temp = emit_move_insn (product, product); temp = emit_move_insn (product, product);
REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL, REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
gen_rtx (MULT, mode, copy_rtx (op0), gen_rtx (MULT, mode,
copy_rtx (op0),
copy_rtx (op1)), copy_rtx (op1)),
REG_NOTES (temp)); REG_NOTES (temp));
}
return product; return product;
} }
} }
...@@ -2613,6 +2619,8 @@ emit_libcall_block (insns, target, result, equiv) ...@@ -2613,6 +2619,8 @@ emit_libcall_block (insns, target, result, equiv)
} }
last = emit_move_insn (target, result); last = emit_move_insn (target, result);
if (mov_optab->handlers[(int) GET_MODE (target)].insn_code
!= CODE_FOR_nothing)
REG_NOTES (last) = gen_rtx (EXPR_LIST, REG_NOTES (last) = gen_rtx (EXPR_LIST,
REG_EQUAL, copy_rtx (equiv), REG_NOTES (last)); REG_EQUAL, copy_rtx (equiv), REG_NOTES (last));
...@@ -3823,13 +3831,16 @@ expand_fix (to, from, unsignedp) ...@@ -3823,13 +3831,16 @@ expand_fix (to, from, unsignedp)
emit_label (lab2); emit_label (lab2);
if (mov_optab->handlers[(int) GET_MODE (to)].insn_code
!= CODE_FOR_nothing)
{
/* Make a place for a REG_NOTE and add it. */ /* Make a place for a REG_NOTE and add it. */
insn = emit_move_insn (to, to); insn = emit_move_insn (to, to);
REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUAL, REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUAL,
gen_rtx (UNSIGNED_FIX, GET_MODE (to), gen_rtx (UNSIGNED_FIX, GET_MODE (to),
copy_rtx (from)), copy_rtx (from)),
REG_NOTES (insn)); REG_NOTES (insn));
}
return; return;
} }
#endif #endif
......
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