1. Bug in 64 bit Phix [fixed, thanks]

This one has apparently lain dormant for a while...

?{999999999,9999999994} 
for i=1 to 2 do 
    ?{999999999,i,9999999994} 
end for 

Output:

{999999999,9999999994} 
{999999999,1,1410065402} 
{999999999,2,1410065402} 

Clearly something wrong in pmain.e/DoSequence() or the pEmit2.e side of that,
otherwise I'm not quite sure how I'm going to fix it but I figured y'all should know,
and may as well ask if anyone has any bright ideas...

new topic     » topic index » view message » categorize

2. Re: Bug in 64 bit Phix

That's really odd.

Don't know if this is any help, but 9999999994 − 1410065402 =
0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0000 0000 0000 0000 0000

ie, binary 1410065402 = binary 9999999994 without that extra 0010 in position 8.

Like I said, maybe no help at all, just thought i'd run it through a binary calculator.

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Bug in 64 bit Phix

Yep, that was precisely it.

9999999994 === #2540BE3FA, and pilx86.e/emitHexDword()  
   was emitting #540BE3FA, dropping the #2 high-dword. 

It now checks for v<-#80000000 or v>#FFFFFFFF, and there is a new emitHexQuadword() for cases that need it.

Thanks. I had a bit of brain-freeze due to the rather long-winded wild goose chase it took to get to the above example.

(Of course I've run slap into the next issue... then again me finding them has to be better than shipping a release w/o detecting them)

Update, just for completeness: Now fixed, that turned out to be another long-dormant shocker... cmp [var],reg was (always) emitting an out-by-4 address! (again, on 64-bit only)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu