[ECOS] Redboot and builtin functions

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Thu Oct 19 11:02:00 GMT 2000


> -----Original Message-----
> From: Bart Veer [ mailto:bartv@redhat.com ]
> Sent: Thursday, October 19, 2000 5:01 AM
> To: Fabrice_Gautier@sdesigns.com
> Cc: ecos-discuss@sourceware.cygnus.com
> Subject: Re: [ECOS] Redboot and builtin functions
> 
> 
> >>>>> "Fabrice" == Fabrice Gautier 
> <Fabrice_Gautier@sdesigns.com> writes:

>     Fabrice> So, a few questions:
> 
>     Fabrice> 1/ Do the builtins are intented to be used at all in
>     Fabrice> eCos? (if not, it lacks a -fno-builtin in the 386 target)
> 
> Yes. However my understanding is that the compiler may not support all
> the builtins on all targets. Even when a builtin is implemented for a
> given target it will not apply in all cases. For example in the case
> of memcpy() the compiler might only generate inline code if it knows
> about source and destination alignments, otherwise it would invoke the
> function. An inlined memcpy() which can cope with all possible cases
> involves a non-trivial amount of code, so using such a builtin
> everywhere would lead to code bloat.
 
But the problem is that Redboot functions does not have the same declaration
than builtins or libc ones.
 
>     Fabrice> 3/ Which memcpy/memset the common ethernet support and
>     Fabrice> ethernet drivers are supposed to use ?
> 
> The builtins if the compiler believes that is the right choice given
> the target processor and its knowledge about e.g. data alignment.
> 
> Otherwise the RedBoot ones if the ethernet drivers are being used
> inside RedBoot (I think).
> 
> Otherwise the ones in libc - unless there is an alternative
> implementation in e.g. the architectural HAL

Same problem (not the same prototype), and that would means add a dependency
to libc for the driver. Or a dependency on a macro (like IMPLEMENT_MEMSET)
provided by libc and redboot.

What I want is to get rid of these warnings. And I'm not sure the what the
correct solution is.

Thanks
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 


More information about the Ecos-discuss mailing list