Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: libm compilation failing in -current
In article <3c3781387d0.10bbbfc5%mail.pb-owl.de@localhost>,
Frank Wille <frank%phoenix.owl.de@localhost> wrote:
>Ignatios Souvatzis wrote:
>
>>> [..DT_TEXTREL..]
>>> 00000000 <atan>:
>>> 0: 60ff 0000 0000 bral 2 <atan+0x2>
>>> 2: R_68K_PC32 __fplsp060_0038
>>>
>>> All are coming from src/lib/libm/arch/m68060 and calling functions
>>> from Motorola's 68060 floating point library (which is the reason it
>>> didn't happen to anybody else before ;).
>>
>> Well, while it might be interesting to have this in a compilable
>> state, I want to mention that after I did all the work to integrate
>> this stuff, at least optionally, all benchmarks I ran showed that the
>> kernel-trapping FPSP (with the normal m68k FPU instruction or whatever
>> it uses libm) was faster, at least on a otherwise loaded system.
>
>That's disappointing! :|
>Under AmigaOS using the 68060 library makes it *much* faster.
>
>
>> The reason is probably that kernel-FPSP resides at a fixed physical
>> address (once the kernel is booted), so needs less cache reloading to
>> use.
>
>Hard to believe that it has such an effect.
>
>
>> I think I posted the benchmark results back then?
>
>Don't remember. 10 years ago? ;)
>
>
>Nevertheless, I fixed makeas.sh in lib/libm/arch/m68060 to jump through the
>PLT. Now it compiles fine. Should I check this in?
>
>Index: lib/libm/arch/m68060/makeas.sh
>===================================================================
>RCS file: /cvsroot/src/lib/libm/arch/m68060/makeas.sh,v
>retrieving revision 1.7
>diff -u -r1.7 makeas.sh
>--- lib/libm/arch/m68060/makeas.sh 9 Nov 2009 15:35:28 -0000 1.7
>+++ lib/libm/arch/m68060/makeas.sh 5 Jan 2010 20:57:28 -0000
>@@ -71,11 +71,11 @@
>
> ENTRY($NAME)
> #ifdef __SVR4_ABI__
>- jbra _C_LABEL(__fplsp060_$OFFS)
>+ bral _C_LABEL(__fplsp060_$OFFS)@PLTPC
> #else
> movel %sp@(8),%sp@-
> movel %sp@(8),%sp@-
>- jbsr _C_LABEL(__fplsp060_$OFFS)
>+ bsrl _C_LABEL(__fplsp060_$OFFS)@PLTPC
> fmoved %fp0,%sp@
> movel %sp@+,%d0
> movel %sp@+,%d1
>@@ -104,10 +104,10 @@
>
> ENTRY($NAME)
> #ifdef __SVR4_ABI__
>- jbra _C_LABEL(__fplsp060_$OFFS)
>+ bral _C_LABEL(__fplsp060_$OFFS)@PLTPC
> #else
> movel %sp@(4),%sp@-
>- jbsr _C_LABEL(__fplsp060_$OFFS)
>+ bsrl _C_LABEL(__fplsp060_$OFFS)@PLTPC
> fmoves %fp0,%sp@
> movel %sp@+,%d0
> rts
Looks good, but you should probably use the PIC_PLT() macro from asm.h
if bsrl can handle non-plt jumps; otherwise you need an ifdef I think.
christos
Home |
Main Index |
Thread Index |
Old Index