Hello Eric,
bswapdi2 is implemented in libgcc2.c as follows:

#ifdef L_bswapdi2
DItype
__bswapdi2 (DItype u)
{
...
}
#endif

One way to avoid compilation of this function is to add condition macros like: #if LONG_LONG_TYPE_SIZE > 32

However, libgcc2.h does not have such facility and declaration will be included unconditionally. This will cause compilation failure if DItype is not supported. I guess, libgcc2.h does not declare most of functions with explicit SItype or DItype, it mostly uses Wtype and DWtype. Please correct me if I am wrong. It would be very helpful to conditionally declare such functions in libgcc2.h.

Thanks a lot for looking into this matter. I will be waiting for you next mail.

Regards,
Pompa

Eric Christopher wrote:

On Jun 20, 2007, at 9:40 PM, Pompapathi V Gadad wrote:

Hello Eric,
The target I am working on is 16-bit target and cannot support 64-bit data types (DI mode).

How about conditionally declare the function?
#if LONG_LONG_TYPE_SIZE > 32
extern DItype __bswapdi2 (DItype);
#endif

You'll want to do it where the function is compiled, see other functions that use DItype. :)

Or, I'll probably get to it in a day or two...

-eric



Reply via email to