This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35507] [avr] 4.3.0: size of small funcion increases from 2 to 29 words
- From: "hutchinsonandy at aim dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2008 12:23:50 -0000
- Subject: [Bug target/35507] [avr] 4.3.0: size of small funcion increases from 2 to 29 words
- References: <bug-35507-6291@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from hutchinsonandy at aim dot com 2008-03-09 12:23 -------
Here is more info:
Testcase:
static long foo99(long b,long a)
{
return b * a;
}
long foo2(long b, long a)
{
return foo99(b,a);
}
Looking at RTL, the USE of the respective libcalls are reversed. That is the
RTL generated for call to MULSI3 is reversed from a normal C function that has
same arguments and calling conventions.
(call_insn/u 9 8 10 920625-1.c:45 (set (reg:SI 22 r22)
(call (mem:HI (symbol_ref:HI ("__mulsi3") [flags 0x41]) [0 S2 A8])
(const_int 0 [0x0]))) -1 (expr_list:REG_EH_REGION (const_int -1
[0xffffffff])
(nil))
(expr_list:REG_DEP_TRUE (use (reg:SI 18 r18))
(expr_list:REG_DEP_TRUE (use (reg:SI 22 r22))
(nil))))
(call_insn/u 9 8 10 920625-1.c:51 (set (reg:SI 22 r22)
(call (mem:HI (symbol_ref:HI ("foo99") [flags 0x3] <function_decl
0x7fdcf030 foo99>) [0 S2 A8])
(const_int 0 [0x0]))) -1 (expr_list:REG_EH_REGION (const_int 0
[0x0])
(nil))
(expr_list:REG_DEP_TRUE (use (reg:SI 22 r22))
(expr_list:REG_DEP_TRUE (use (reg:SI 18 r18))
(nil))))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35507