aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-10-23 10:30:26 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-10-23 10:30:26 -0400
commit02214a5c1475a8fd2ed983889eab632f31708704 (patch)
tree47bb500a8efd2abe9289f806cc3d31a6d6ec25a9 /gcc
parent39647dcba53dcaa2e18984b86f5546589e92738a (diff)
downloadgcc-02214a5c1475a8fd2ed983889eab632f31708704.zip
gcc-02214a5c1475a8fd2ed983889eab632f31708704.tar.gz
gcc-02214a5c1475a8fd2ed983889eab632f31708704.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/optabs.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index b34dad0..d743fc8 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -964,13 +964,16 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if (i == GET_MODE_BITSIZE (mode) / BITS_PER_WORD)
{
- rtx temp = emit_move_insn (target, target);
+ if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
+ {
+ rtx temp = emit_move_insn (target, target);
- REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
- gen_rtx (binoptab->code, mode,
- copy_rtx (xop0),
- copy_rtx (xop1)),
- REG_NOTES (temp));
+ REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
+ gen_rtx (binoptab->code, mode,
+ copy_rtx (xop0),
+ copy_rtx (xop1)),
+ REG_NOTES (temp));
+ }
return target;
}
else
@@ -1144,12 +1147,15 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if (temp != 0)
{
- temp = emit_move_insn (product, product);
- REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
- gen_rtx (MULT, mode, copy_rtx (op0),
- copy_rtx (op1)),
- REG_NOTES (temp));
-
+ if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
+ {
+ temp = emit_move_insn (product, product);
+ REG_NOTES (temp) = gen_rtx (EXPR_LIST, REG_EQUAL,
+ gen_rtx (MULT, mode,
+ copy_rtx (op0),
+ copy_rtx (op1)),
+ REG_NOTES (temp));
+ }
return product;
}
}
@@ -2613,8 +2619,10 @@ emit_libcall_block (insns, target, result, equiv)
}
last = emit_move_insn (target, result);
- REG_NOTES (last) = gen_rtx (EXPR_LIST,
- REG_EQUAL, copy_rtx (equiv), REG_NOTES (last));
+ if (mov_optab->handlers[(int) GET_MODE (target)].insn_code
+ != CODE_FOR_nothing)
+ REG_NOTES (last) = gen_rtx (EXPR_LIST,
+ REG_EQUAL, copy_rtx (equiv), REG_NOTES (last));
if (prev == 0)
first = get_insns ();
@@ -3823,13 +3831,16 @@ expand_fix (to, from, unsignedp)
emit_label (lab2);
- /* Make a place for a REG_NOTE and add it. */
- insn = emit_move_insn (to, to);
- REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUAL,
- gen_rtx (UNSIGNED_FIX, GET_MODE (to),
- copy_rtx (from)),
- REG_NOTES (insn));
-
+ if (mov_optab->handlers[(int) GET_MODE (to)].insn_code
+ != CODE_FOR_nothing)
+ {
+ /* Make a place for a REG_NOTE and add it. */
+ insn = emit_move_insn (to, to);
+ REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUAL,
+ gen_rtx (UNSIGNED_FIX, GET_MODE (to),
+ copy_rtx (from)),
+ REG_NOTES (insn));
+ }
return;
}
#endif