Path: chuka.playstation.co.uk!news From: martin@fsnsys.com (Martin Day) Newsgroups: scea.yaroze.problems.pc Subject: Re: long long ints for improved accuracy Date: Mon, 15 Dec 1997 15:11:39 -0000 Organization: SN Systems Ltd Lines: 29 Message-ID: References: <673eim$9k36@chuka.playstation.co.uk> NNTP-Posting-Host: martin.snsys.com X-Newsreader: Anawave Gravity v2.00 In article <673eim$9k36@chuka.playstation.co.uk>, john.rees@dial.pipex.com says... > I am trying to use long long ints to hold temporary values during > fixed point calculations, but if I use divide and modulus operations > then the linker complains that certain functions are not found. > > gcc basic.o -Xlinker -Map -Xlinker mapfile -Xlinker -Ttext -Xlinker > 80100000 -o basic > basic.o: In function `main': > basic.c:11: undefined reference to `__divdi3' > basic.c:11: relocation truncated to fit: JMPADDR __divdi3 > basic.c:12: undefined reference to `__moddi3' > basic.c:12: relocation truncated to fit: JMPADDR __moddi3 > make.exe: *** [basic] Error 1 > > It is strange that add, subtract and multiply seem to work, but divide > and modulus are not provided. Even if these would be slow to execute > on a 32 bit machine, it would be VERY useful. >... The compiler will code some double length integer operations in line but will rely on a library for others. The functions you require should have been supplied in a library file called libgcc.a. Whoever built the compiler should really have built this too but it looks like it's been missed out. If you get the gcc source it should be possible for you to build libgcc.a yourself using the yaroze compiler tools. -- Martin E:martin@snsys.com T:+44 117 929 9733 F:+44 117 929 9251