[CLN-list] Re: [cln] sparc64 and OpenBSD
Paul Irofti
bulibuta at gmail.com
Mon Dec 17 01:00:55 CET 2007
On Thu, Nov 29, 2007 at 11:02:17PM +0100, Richard B. Kreckel wrote:
> Hi!
>
> Paul Irofti wrote:
>> On Wed, Nov 28, 2007 at 11:49:57PM +0100, Richard B. Kreckel wrote:
>>> You wrote:
> [...]
>>>> It seems that this is generated by my former fix (the one I was
>>>> inquiring about). I can't just remap a 64-bit to a 32-bit function so a
>>>> devel will have to write an additional assembly routine for 64-bit
>>>> sparc here:
>>> Hmm, why not just drop the assembler support on sparc64 for these
>>> polynomial functions?
>> Don't know, if its possible and it doesn't affect the codebase then do
>> it, afterwards I'll start retesting on sparc64 for porting.
>
>
> You mean, without even having access to such a machine? Ugh...
>
> Well, let's see. Earler, you wrote the error is:
>
>> In file included from polynomial/elem/cl_UP.cc:36:
>> polynomial/elem/cl_UP_GF2.h: In function `uint64 cln::gf2_mul32_(unsigned
>> int, unsigned int)':
>> polynomial/elem/cl_UP_GF2.h:766: error: `gf2_mul_table' undeclared (first
>> use this function)
>> polynomial/elem/cl_UP_GF2.h:766: error: (Each undeclared identifier is
>> reported only once for each function it appears in.)
>
> Indeed, function gf2_mul32_ is defined if intDsize==64 and it refers to
> gf2_mul_table which is defined unless on sparc or sparc64. Hmm, this seems
> to suggest an easy fix:
>
> Index: src/polynomial/elem/cl_UP_GF2.h
> ===================================================================
> RCS file: /home/cvs/cln/src/polynomial/elem/cl_UP_GF2.h,v
> retrieving revision 1.8
> diff -u -r1.8 cl_UP_GF2.h
> --- src/polynomial/elem/cl_UP_GF2.h 1 Aug 2007 22:07:37 -0000 1.8
> +++ src/polynomial/elem/cl_UP_GF2.h 29 Nov 2007 22:01:03 -0000
> @@ -95,7 +95,7 @@
> return x;
> }
>
> -#if !(defined(__sparc__) || defined(__sparc64__))
> +#if !defined(__sparc__) || defined(__sparc64__)
> // Multiplication of polynomials over GF(2) can unfortunately not profit
> // from hardware multiply instructions. Use a table instead.
> // This is a 2^8 x 2^4 table. Maybe a 2^6 x 2^6 table would be better?
>
> Does this help?
>
Indeed it does: the library compiles, but some of the tests fail. Maybe
you can shed some light into this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cln-1.1.13.log.gz
Type: application/x-gunzip
Size: 86776 bytes
Desc: not available
Url : http://www.cebix.net/pipermail/cln-list/attachments/20071217/64b7a5e1/cln-1.1.13.log-0001.gz
More information about the CLN-list
mailing list