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 Tue, 29 Jun 2004, 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.

You're missing the soft-float division since the MaverickCrunch
coprocessor lacks such instruction. You can do this by using the good work
of Nicolas Pitre:
   gcc/config/arm/ieee-754-[sd]f.c

You also have to modify it so the return value is passed through mv0.
Multilibs is a nice solution.

>
> I think Richard Earnshaw and Vladimir Ivanov have spoken about this:
> 	http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00513.html
>
> other than that thread I can't find a lot of references, neither is it
> clear if Nucleusys have their copyright assignment yet, nor what the
> current status is for the Cirrus ep9312 processor.

Nope, we still don't have that copyright assignment, even after three
attempts so far.

As to the current status of EP9312 support in 3.4.x - it is a good work by
Aldy Hernandez, but unfortunatelly kind of unfinished:
  - it lacks prologue/epilogue register save, so function calls get funny
  - it doesn't have proper workarounds for the errata of the current chips
on the market

Also, to have working programs for Linux you need also some changes to
GLIBC. Notice that using shared libraries is *not* possible, unless you
build all your libraries with Crunch support, since the API is different
from the arm-linux default (FPA).

> 	MULTILIB_OPTIONS    += mcpu=ep9312
> 	MULTILIB_DIRNAMES   += ep9312
> 	MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*
>
> (no divdf3 mentioned in LIB1ASMFUNCS in that file, should it?)

Take a look at "t-arm-elf" for example how to include "divdf3".

> Richard Earnshaw commented the divdf3 define_expand pattern might need
> disabling, should I try that?

I don't know, but we have it working without disabling.
I also think that once I tried disabling it and it led to another problem,
but right now I'm not sure what exactly.

Cheers,
  -- vladitx


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