Commit beddf669 by Georg-Johann Lay Committed by Georg-Johann Lay

avr.md (*mulhi3_enh): Treat squaring smarter.

	* config/avr/avr.md (*mulhi3_enh): Treat squaring smarter.

From-SVN: r179739
parent e12693c1
2011-10-10 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.md (*mulhi3_enh): Treat squaring smarter.
2011-10-10 Georg-Johann Lay <avr@gjlay.de>
PR target/50652
* config/avr/avr-mcus.def (AVR_MCU): Set .data_section_start of
atmega164a to 0x100.
......@@ -1560,13 +1560,11 @@
(mult:HI (match_operand:HI 1 "register_operand" "r")
(match_operand:HI 2 "register_operand" "r")))]
"AVR_HAVE_MUL"
"mul %A1,%A2
movw %0,r0
mul %A1,%B2
add %B0,r0
mul %B1,%A2
add %B0,r0
clr r1"
{
return REGNO (operands[1]) == REGNO (operands[2])
? "mul %A1,%A1\;movw %0,r0\;mul %A1,%B1\;add %B0,r0\;add %B0,r0\;clr r1"
: "mul %A1,%A2\;movw %0,r0\;mul %A1,%B2\;add %B0,r0\;mul %B1,%A2\;add %B0,r0\;clr r1";
}
[(set_attr "length" "7")
(set_attr "cc" "clobber")])
......
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