This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EP9312 gcc: undefined reference to __divdf3


On Wed, Jun 30, 2004 at 10:45:29AM +0100, Richard Earnshaw wrote:
> On Tue, 2004-06-29 at 10:22, Wouter van Heyst wrote:
> > Hello all,
> > 
> > I'm running into a problem trying to make a gcc 3.4.0 based toolchain
> > with MaverickCrunch support, during the final linkage of libc.so,
> > several functions turn up undefined references to __divdf3.
> 
> This is a bug and you should file it in our bugzilla database:
> 
> 	http://gcc.gnu.org/bugzilla
> 
> The problem is that the FPU on this chip does not have a floating point
> divide instruction, so we need to provide one in software.  The library
> function that we have (in config/arm/ieee754-df.c) returns values in
> integer registers, but in the configuration you have the compiler would
> expect it to be returned in an FP register; so at this point in time
> there is no benefit to be gained from making it call the library
> function directly.

Nasty. I completely overlooked the fact there is no floating point
divide instruction, but looking at the ep9312 user guide I'm afraid
you're right, sigh. Would another configuration give integer register
passing _and_ MaverickCrunch support?

> 
> The best solution would be to tell the compiler that all floating point
> compiler support functions return values in integer registers, but
> before we can do that we have to re-implement a couple of support calls
> that are currently coded in C (and thus use normal register passing
> conventions).

How do you determine what support calls need to be reimplemented?

> The solution is complex enough that I suspect that it's unlikely that
> this will be fixed in the gcc 3.4 series, since this is not a
> regression.

Yesterday drow and pbrook on #gcc suggested I try csl-arm-branch, using
that instead of gcc-3.4.0 but configure/test the same way, there is no
undefined reference. Unfortunately, there is also no Crunch assembly
anymore, bummer.

Since it's more than just an undefined reference, how do you suggest the
bug be worded? Something like "floating point support function should
return values in integer registers"? 

Not having this fixed in 3.4 isn't that big a problem for me, getting a
working situation reasonably soonish is more important. From your
explanation above I have a vague idea what needs to be done, but none at
all on how to do it. More reading of code coming up for me I suppose.

Wouter van Heyst


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]