[Bug target/35507] [avr] 4.3.0: size of small funcion increases from 2 to 29 words

hutchinsonandy at aim dot com gcc-bugzilla@gcc.gnu.org
Sun Mar 9 12:24:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list