[PATCH] Always inline system calls

Bernhard Fischer rep.dot.nop at gmail.com
Tue Dec 4 12:04:31 UTC 2007


On Tue, Dec 04, 2007 at 08:36:31AM +0100, Carmelo AMOROSO wrote:
>Paul Mundt wrote:
>> On Mon, Dec 03, 2007 at 10:33:39PM +0100, Carmelo Amoroso wrote:
>>   
>>> Carmelo Amoroso wrote:
>>> while doing some test for SH4 to measure size increase for 'always inline' changes,
>>> doscovered suddenly that gcc-4.1.1 (cross sh4) fails with the following error:
>>>
>>> ../ldso/ldso/dl-elf.c: In function '_dl_dprintf':
>>> ../ldso/ldso/dl-elf.c:858: error: unable to find a register to spill in class 'R0_REGS'
>>> ../ldso/ldso/dl-elf.c:858: error: this is the insn:
>>> (insn 916 917 24 1 (set (reg/f:SI 1 r1 [219])
>>>          (mem/u/c:SI (plus:SI (reg:SI 12 r12)
>>>                  (reg/f:SI 1 r1 [220])) [0 S4 A32])) 172 {movsi_ie} (nil)
>>>      (expr_list:REG_DEAD (reg/f:SI 1 r1 [220])
>>>          (expr_list:REG_EQUIV (symbol_ref:SI ("_dl_pagesize") <var_decl 0x313a720 _dl_pagesize>)
>>>              (nil))))
>>>
>>> either running with -Os or -O0.
>>> I'll test tomorrow with gcc-4.2.1 to see if it makes difference,
>>> otherwise I suspect we should go back on my proposal in using always inline
>>> only for arch strictly requiring it.
>>>
>>>     
>> We've noticed this with some versions in buildroot also, so it seems to
>> be a more common issue:
>>
>>   
>Indeed at home I have gcc from buildroot. Tested just now at office 
>using gcc-4.2.1 from STMicro toolchain
>and it works fine, either using -O0 or -Os.
>I'll try to update buildroot at home with gcc 4.2.1 as well and see if 
>it solves.
>I'll keep you informed.
>
>Cheers,
>Carmelo
>> 	 CC ldso/ldso/ldso.oS
>> 	  In file included from ./libpthread/linuxthreads.old/sysdeps/sh/tls.h:23,
>> 	from ./include/bits/uClibc_errno.h:35,
>> 	from ./include/errno.h:62,
>> 	from ./include/bits/syscalls.h:16,
>> 	from ./include/sys/syscall.h:34,
>> 	from ./ldso/ldso/sh/dl-syscalls.h:3,
>> 	from ./ldso/include/dl-syscall.h:12,
>> 	from ./ldso/include/ldso.h:36,
>> 	from ldso/ldso/ldso.c:33:
>> 	./libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h:36: warning: C99 inline functions are not supported; using GNU89
>> 	./libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h:36: warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute

This needs fixing anyway. See the patch in my buildroot repo.



More information about the uClibc mailing list