[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU Crypto] GNU crypto and gcj
From: |
Mark Wielaard |
Subject: |
Re: [GNU Crypto] GNU crypto and gcj |
Date: |
12 Oct 2002 01:32:36 +0200 |
Hi,
On Sat, 2002-10-12 at 00:00, Casey Marshall wrote:
> So it appears that when gcj -O2 compiles the statement
>
> result[j++] = (byte)((fromDigit(s.charAt(i++)) << 4) |
> fromDigit(s.charAt(i++)));
>
> it flips the order of the two calls to 'fromDigit(s.charAt(i++))',
> swapping the lower four bits and the top four for each byte.
Nasty.
> The attached patch will fix the gcj build. If someone can confirm this
> fix I'll check it in.
Yeah! This works for me.
All test vectors are the same again and almost all tests are much faster
then without -O2 (sometimes more then 2 times!). Except for Serpent
which in almost 10 times slower, but I believe that algorithm changed
(the last test run was against the classpathx cvs which contained a
slightly older version of the code).
> This result is with GCC 3.1; I don't know if the problem exists with
> more recent versions.
Yes, this issue exists in gcj 3.2 and gcj 3.3 from CVS. So please make
sure to mail this to address@hidden or file a bug report at
<http://gcc.gnu.org/cgi-bin/gnatsweb.pl>
Thanks,
Mark