> -----Original Message-----
> From: Leopold Toetsch [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 08, 2004 1:29 AM
> To: Adam Thomason
> Cc: [EMAIL PROTECTED]
> Subject: Re: [perl #29402] [BUG] 64-bit bitops
> 
> 
> Adam Thomason <[EMAIL PROTECTED]> wrote:
> 
> > _main:
> >     set I1, 0xffffffff
> >     shl I1, I1, 32
> >     set I2, 0xffffffff
> >     print I2 # prints -1
> 
> Old imcc code strikes back. It used atoi() and with 32 bit ints and 64
> bit opcodes/INTVALs this is the expected and wrong result.
> 
> I've now changed a bunch of lines that deal with INTVAL 
> constants. Could
> you please try again and generate a new test file, that is 
> run only for
> $PConfig{intvalsize} > 4.
> 
> leo
> 

Attached patch implements a bitops test for 64 bit ints.  Platforms where 
$PConfig{intvalsize} != 8 are skipped.  It covers the issues I had trouble with 
concerning the shl, band, and bor ops.

I haven't managed to beat ICU into submission on AIX yet, so I can't test it out 
anywhere but AMD64.  It's worth monitoring other 64-bit arches to see if the test 
passes.

Adam

Attachment: bitops64test.patch
Description: bitops64test.patch

Reply via email to