diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-22 01:54:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-22 01:54:40 +0000 |
commit | e22b1f6530014e60ade1132cfea0333d9798115a (patch) | |
tree | 18c228fed28fb6169779a104ca3a4b452f6a015e /gcc/optabs.c | |
parent | db34a10922df4970fe8697b3fb71e02f027f1265 (diff) | |
download | gcc-e22b1f6530014e60ade1132cfea0333d9798115a.tar.gz |
* optabs.c (expand_binop): For double-word integer multiplies,
do not compute intermediate results into something that is
not a register (such as a SUBREG or MEM).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 46b86c534da..da43dd18417 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1461,6 +1461,9 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) rtx temp = expand_binop (word_mode, binoptab, op0_low, op1_xhigh, NULL_RTX, 0, OPTAB_DIRECT); + if (!REG_P (product_high)) + product_high = force_reg (word_mode, product_high); + if (temp != 0) temp = expand_binop (word_mode, add_optab, temp, product_high, product_high, 0, next_methods); @@ -1480,6 +1483,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) if (temp != 0 && temp != product_high) emit_move_insn (product_high, temp); + emit_move_insn (operand_subword (product, high, 1, mode), product_high); + if (temp != 0) { if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) |