bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Re: Bug in mpn/m68k/lshift.asm


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: Bug in mpn/m68k/lshift.asm
Date: 16 Aug 2002 10:12:05 -0400

Greetings, and thanks!  This patch, together with the analogous one
for rshift.asm, clears up the issue entirely, and results in an m68k
gcl/maxima build passing all tests without errors.  10/11 Debian
architectures now supported on the same code base!

Take care, and thanks again,

Kevin Ryde <address@hidden> writes:

> --=-=-=
> 
> Camm Maguire <address@hidden> writes:
> >
> > 0x8007a944 <__gmpn_lshift+52>:      movel %d6,%d0
> > 0x8007a946 <__gmpn_lshift+54>:      asll #2,%d0
> > 0x8007a948 <__gmpn_lshift+56>:      addal %d6,%a0
> > 0x8007a94a <__gmpn_lshift+58>:      addal %d6,%a1
> >
> > i reg a0
> > a0             0x80242bdd   0x80242bdd
> 
> Thanks, I think there's a bug there.  It adds plain "size" to the
> pointers, not 4*size.  Patch for lshift.asm below, if you'd like to
> give it a run.
> 
> The try.c program can be used to exercise low level routines like that
> too,
> 
>       cd tests/devel
>       make try
>       ./try mpn_lshift
> 
> It'll run nearly forever, let it go for a minute or so then kill it.
> 
> 
> > I short, the issue persists.  I've tried gcc-3.0, and
> > configuring as mc68020  (the machine is an 060).  Same symptoms.
> 
> The bad bit is in the 68000 case.  If you're using the packaged
> libgmp3 then that's configured as "m68k-linux" which will hit that
> code.
> 
> > Configuring with --build=none... compiles, but loses precision
> > apparently on some maxima numerical tests.
> 
> Don't know why that should be, the asm and C ought to come out
> identical.
> 
> > Lastly, linking with gmp2
> > works fine -- compiling and passing all tests.
> 
> The bug is in gmp 2 also, but doesn't get exposed since lshift.S lets
> gcc tell it what the chip is, and 68020 is apparently the default for
> that.
> 
> 
> 
> --=-=-=
> Content-Type: application/x-patch
> Content-Disposition: attachment; filename=lshift.asm.diff
> 
> --- lshift.asm.~1.3.~ Fri Nov 16 07:45:07 2001
> +++ lshift.asm        Thu Aug 15 21:31:35 2002
> @@ -73,8 +73,8 @@
>  ',`
>       movel   s_size, d0
>       asll    #2, d0
> -     addl    s_size, s_ptr
> -     addl    s_size, res_ptr
> +     addl    d0, s_ptr
> +     addl    d0, res_ptr
>  ')
>       movel   M(-,s_ptr), d2
>       movel   d2, d0
> 
> --=-=-=--
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]