| delorie.com/archives/browse.cgi | search |
| Xref: | news2.mv.net comp.os.msdos.djgpp:3511 |
| From: | richard DOT young AT crc DOT doc DOT ca (Richard Young) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: libm.a/linker *BUG* with test program |
| Date: | 6 May 1996 18:51:35 GMT |
| Organization: | Communications Research Centre |
| Lines: | 51 |
| Message-ID: | <4mlhnn$inf@crc-news.doc.ca> |
| References: | <25900 DOT 9605051801 AT bylands DOT dur DOT ac DOT uk> <318DE92E DOT 41C6 AT LSTM DOT Ruhr-UNI-Bochum DOT De> <318E1002 DOT 2781 AT LSTM DOT Ruhr-UNI-Bochum DOT De> |
| NNTP-Posting-Host: | yaker.vpcs.doc.ca |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
In article <318E1002 DOT 2781 AT LSTM DOT Ruhr-UNI-Bochum DOT De>, demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De says...
>Thomas Demmer wrote:
>> The solution is to change src/libm/src/s_scalbn.S to:
>>
>> #include <machine/asm.h>
>>
>> ENTRY(scalbn)
>> ... some incorrect code
>> ret
>>
>> gcc -c s_scalbn.S
>>
>> and replace s_scalbn.o in libm.a
>>
>> with
>> ar -rv libm.a s_scalbn.o
>
>Sometimes I'm pretty stupid...
>
>The correction _MUST_ be
> ENTRY(scalbn)
> fidl 12(%esp)
> fldl 4(%esp)
> fscale /* Now we have result in ST(0) and */
> /* 2nd operand in ST(1) */
> ffree %st(1)
> ret
The compiler does not like the line
fidl 12(%esp)
in the above correct scalbn routine.
It should instead be
fildl 12(%esp)
I've put the fix into my libm.a and it has eliminated the
problems that I was having.
Thanks to Thomas Demmer for his timely solution.
------------------------------------------------
Richard Young
Communications Research Centre
Ottawa, Canada
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |