|Re: failure due to compiler? email@example.com (1996-07-04)|
|Re: failure due to compiler? firstname.lastname@example.org (1996-07-15)|
|Re: failure due to compiler? email@example.com (1996-07-22)|
|Re: failure due to compiler ? firstname.lastname@example.org (1996-07-23)|
|From:||email@example.com (Andrea Griffini)|
|Date:||23 Jul 1996 23:26:48 -0400|
|References:||96-07-041 96-07-100 96-07-148|
Using Borland Pascal 7.0 on the PC i ran into a very strange problem
in a compression program; after debugging at the assembler level into
the runtime libraries i found a bug in the shift operator on long
(32 bit) integers.
a:=$12345; (* hexadecimal constant *)
writeln(a shr 24) (* this prints 256 instead of 0 *)
The problem appears only if a 386 or newer processor is found and is
due to a non-supported (wrong?) use of the double-shift instruction (a
shift with a counter bigger than the destination).
Try to guess how many things i dobule checked in my LZW program before
suspecting the shift operator ... :)
Andrea Griffini \ firstname.lastname@example.org
programmer \ http://www.netcom.com/~agriff
Return to the
Search the comp.compilers archives again.