Commit 5d195441 by Torbjorn Granlund

(RTX_COST): Return actual costs for multiplication...

(RTX_COST): Return actual costs for multiplication, not costs for
theoretical special cases that are not handled in the md.

From-SVN: r6008
parent 12a3cb7a
......@@ -1402,24 +1402,10 @@ __transfer_from_trampoline () \
return COSTS_N_INSNS (3); /* lsr #i,dn */ \
break; \
case MULT: \
if (GET_CODE (XEXP (x, 1)) == CONST_INT \
&& exact_log2 (INTVAL (XEXP (x, 1))) >= 0) \
{ \
/* A shift by a big integer takes an extra instruction. */ \
if (GET_CODE (XEXP (X, 1)) == CONST_INT \
&& (INTVAL (XEXP (X, 1)) == (1 << 16))) \
return COSTS_N_INSNS (2); /* clrw;swap */ \
if (GET_CODE (XEXP (X, 1)) == CONST_INT \
&& !(INTVAL (XEXP (X, 1)) > 1 \
&& INTVAL (XEXP (X, 1)) <= 256)) \
return COSTS_N_INSNS (3); /* lsr #i,dn */ \
break; \
} \
else if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \
if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \
return COSTS_N_INSNS (MULW_COST); \
else \
return COSTS_N_INSNS (MULL_COST); \
break; \
case DIV: \
case UDIV: \
case MOD: \
......
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